This commit is contained in:
gac-x11ma
2025-10-30 14:02:37 +01:00
parent fb9b13eead
commit 9f74db9be6
8 changed files with 251 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
#Fri Oct 24 14:56:55 CEST 2025
#Thu Oct 30 14:02:21 CET 2025
commandQueueSize=-1
commandStatistics=false
commandTimeToLive=600000
@@ -48,5 +48,5 @@ userAuthenticator=
userManagement=true
versionTrackingEnabled=true
versionTrackingLogin=
versionTrackingManual=true
versionTrackingManual=false
versionTrackingRemote=https\://gitea.psi.ch/pshell_config/x11ma.git

View File

@@ -1,4 +1,4 @@
#Thu Oct 23 10:35:10 CEST 2025
#Thu Oct 30 13:51:14 CET 2025
ALPHA_ID_2=0.0
AUTO_SWITCH_BEAMLINE=false
AUTO_SWITCH_SHUTTER=true

View File

@@ -1,4 +1,4 @@
#Wed Oct 22 17:04:16 CEST 2025
DaySequentialNumber=2
FileSequentialNumber=125
LastRunDate=251022
#Thu Oct 30 14:02:28 CET 2025
DaySequentialNumber=11
FileSequentialNumber=140
LastRunDate=251030

View File

@@ -1,8 +1,8 @@
#Thu Oct 23 14:04:00 CEST 2025
#Mon Oct 27 13:27:27 CET 2025
colormap=Grayscale
colormapAutomatic=false
colormapLogarithmic=false
colormapMax=1.0
colormapMax=9.0
colormapMin=0.0
flipHorizontally=false
flipVertically=false

81
plugins/TestScript.form Normal file
View File

@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="60" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="spinnerInterval" linkSize="1" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="spinnerSamples" linkSize="1" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace pref="74" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerSamples" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerInterval" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="94" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="text" type="java.lang.String" value="Samples:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel2">
<Properties>
<Property name="text" type="java.lang.String" value="Interval:"/>
</Properties>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerInterval">
<Properties>
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
<SpinnerModel initial="0.1" maximum="1000.0" minimum="0.001" numberType="java.lang.Double" stepSize="1.0" type="number"/>
</Property>
</Properties>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerSamples">
<Properties>
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
<SpinnerModel initial="10" maximum="1000" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
</Property>
</Properties>
</Component>
</SubComponents>
</Form>

155
plugins/TestScript.java Normal file
View File

@@ -0,0 +1,155 @@
import ch.psi.pshell.framework.ScriptProcessor;
import ch.psi.pshell.framework.Task;
import ch.psi.pshell.utils.State;
import java.util.HashMap;
import java.util.Map;
/**
*
*/
public class TestScript extends ScriptProcessor {
//TODO: set script name
public static final String SCRIPT_NAME = "test/TestScript";
public TestScript() {
initComponents();
}
//Overridable callbacks
@Override
public void onInitialize(int runCount) {
}
@Override
public void onStateChange(State state, State former) {
spinnerSamples.setEnabled(state.isReady());
spinnerInterval.setEnabled(state.isReady());
}
@Override
public void onExecutedFile(String fileName, Object result) {
}
@Override
public void onTaskFinished(Task task) {
}
@Override
protected void onTimer() {
}
@Override
protected void onLoaded() {
}
@Override
protected void onUnloaded() {
}
@Override
protected void onStartingExecution(Map<String, Object> args) throws Exception{
}
@Override
protected void onFinishedExecution(Map<String, Object> args, Object ret, Throwable t) throws Exception{
}
//Invoked by 'update()' to update components in the event thread
@Override
protected void doUpdate() {
}
@Override
public String getScript(){
return SCRIPT_NAME;
}
@Override
public Map<String, Object> getArgs(){
//TODO: add script arguments
Map<String, Object> ret = new HashMap<>();
ret.put("samples", ((Number)spinnerSamples.getValue()).intValue());
ret.put("interval", ((Number)spinnerInterval.getValue()).doubleValue());
return ret;
}
@Override
public boolean canPause() {
return true;
}
@Override
public void clear() {
spinnerSamples.setValue(10);
spinnerInterval.setValue(0.1);
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
spinnerInterval = new javax.swing.JSpinner();
spinnerSamples = new javax.swing.JSpinner();
jLabel1.setText("Samples:");
jLabel2.setText("Interval:");
spinnerInterval.setModel(new javax.swing.SpinnerNumberModel(0.1d, 0.001d, 1000.0d, 1.0d));
spinnerSamples.setModel(new javax.swing.SpinnerNumberModel(10, 1, 1000, 1));
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(60, 60, 60)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(spinnerInterval, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinnerSamples, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(74, Short.MAX_VALUE))
);
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerInterval, spinnerSamples});
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(26, 26, 26)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(spinnerSamples, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(spinnerInterval, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(94, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JSpinner spinnerInterval;
private javax.swing.JSpinner spinnerSamples;
// End of variables declaration//GEN-END:variables
}

View File

@@ -0,0 +1,3 @@
r = tscan(keithley_1a, samples, interval)
set_return(r)

View File

@@ -4,6 +4,7 @@ sensors = [Keithley_2_raw]
#ascan([FE_CX, FE_CY], sensors, [X_min, Y_min], [X_max, Y_max], [X_step, Y_step], latency=0.5, zigzag=True)
#ascan([FE_CX, FE_CY], sensors, [-1.0, 0.3], [0.0, 1.3], [0.1, 0.1], latency=0.5, zigzag=True)
ascan([m1, m2], sensors, [-0.5, 0.45], [0.0, 1.05], [0.05, 0.05], latency=0.5, zigzag=False)
#ascan([m1, m2], sensors, [-0.5, 0.45], [0.0, 1.05], [0.05, 0.05], latency=0.5, zigzag=False)
#lscan(energy, sensors, 1100, 1900, 5.0, latency=0.5)
#lscan(energy, sensors, 1100, 1900, 5.0, latency=0.5)
tscan(sensors, 10, 0.1)