Tilt homing

This commit is contained in:
e19752
2022-05-24 10:16:16 +02:00
parent 065e33ad05
commit 6de2af0dca
181 changed files with 5817 additions and 1017 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,3 +1,4 @@
voltage=ch.psi.pshell.epics.ChannelDouble|X11MA-KEI13:SETVOLTAGE|||true
eiger=ch.psi.pshell.epics.AreaDetector|X11MA-ES1-SD1|||true
fe_slit_V_ctr=ch.psi.pshell.epics.Motor|X11MA-FE-SV:center|||true
fe_slit_H_ctr=ch.psi.pshell.epics.Motor|X11MA-FE-SH:center|||true
@@ -79,11 +80,12 @@ Ecrbk=ch.psi.pshell.epics.ChannelDouble|X11MA-PGM:CERBK|Read||true
CADC1=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC1|Read||true
CADC2=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC2|Read||true
CADC3=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC3|Read||true
#CADC4=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC4|Read||true
CADC4=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC4|Read||true
#CADC5=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC5|Read||true
#CADC6=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC6|Read||true
#CADC7=ch.psi.pshell.epics.ChannelDouble|X11MA-ES1:CADC7|Read||true
girder_x=ch.psi.pshell.epics.Positioner|X11MA-HG:X_SET X11MA-HG:X1|||true
temp_readout=ch.psi.pshell.epics.ReadonlyProcessVariable|X11MA-PC-SW:Pt100-K|||true
cam2=ch.psi.pshell.epics.AreaDetector|X11MA-ES1-CAM2|||true
raw=ch.psi.pshell.imaging.CameraSource|eiger|||true
image2=ch.psi.pshell.imaging.CameraSource|cam2|||true

1
config/plugins.properties Executable file → Normal file
View File

@@ -1,3 +1,4 @@
XPEEM_Settings.java=enabled
Align_ComputeShifts.java=disabled
Imaging.java=disabled
Initialization.java=disabled

View File

@@ -1,5 +1,5 @@
#Sat Dec 04 14:45:18 CET 2021
keywords=List;[]
ownerEmail=String;arik.beck@psi.ch
#Sat Apr 30 16:57:19 CEST 2022
keywords=List;[]ASI
ownerEmail=String;alan_farhan@baylor.edu
contactEmail=String;armin.kleibert@psi.ch
owner=String;Federico Stramaglia
owner=String;Alan Farhan

5
config/sessions.properties Executable file → Normal file
View File

@@ -1,2 +1,3 @@
#Mon Nov 29 10:07:24 CET 2021
SessionCounter=54
#Mon May 23 22:49:52 CEST 2022
SessionCounter=73
CurrentSession=73

View File

@@ -1,23 +1,23 @@
#Tue Dec 14 13:48:54 CET 2021
#Tue May 24 10:06:26 CEST 2022
HARMONIC_ID_1=1
RSYNC_USER=
OUTLIERS_THRESHOLD=1000000000
NORM_FILE=/sls/X11MA/data/e19357/Data1/2021_10
AUTO_SWITCH_VALVE=true
DRY_RUN=false
POL_ID_2=Lin_Hor
OFFSET_ID_1=-5.0
POL_ID_2=Lin_Ver
OFFSET_ID_1=-1.4
ID=ID2
OFFSET_ID_2=-2.1
OFFSET_ID_2=-1.2
proposal=proposal
ENERGY=800.0
ENERGY=455.0
proposer=proposer
POL_ID_1=Lin_Hor
POL_ID_1=Circ_Plus
RSYNC_HOST=
sample=sample
RSYNC_PATH=
pgroup=pgroup
ALPHA_ID_2=60.0
ALPHA_ID_2=45.0
ALPHA_ID_1=0.0
RSYNC_DEL=true
AVERAGING_DETECTOR=true

View File

@@ -1,4 +1,4 @@
#Sat Dec 11 05:45:56 CET 2021
LastRunDate=211211
FileSequentialNumber=11873
DaySequentialNumber=66
#Mon May 23 23:22:11 CEST 2022
LastRunDate=220523
FileSequentialNumber=13674
DaySequentialNumber=9

10
devices/dp.properties Normal file
View File

@@ -0,0 +1,10 @@
#Fri Mar 18 13:36:57 CET 2022
minValue=NaN
unit=null
offset=0.0
maxValue=NaN
rotation=false
precision=-1
sign_bit=0
scale=1.0
resolution=NaN

View File

@@ -1,13 +1,13 @@
#Thu Sep 09 15:24:03 CEST 2021
#Thu Mar 24 11:38:37 CET 2022
precision=5
scale=1.0
estbilizationDelay=0
resolution=0.01
resolution=0.1
minValue=-100.0
defaultSpeed=0.5
defaultSpeed=1.0
sign_bit=0
monitorByPosition=false
minSpeed=0.05
minSpeed=0.1
offset=0.0
maxValue=100.0
rotation=false

View File

@@ -1,13 +1,13 @@
#Thu Sep 09 15:24:18 CEST 2021
#Thu Mar 24 11:38:38 CET 2022
precision=5
scale=1.0
estbilizationDelay=0
resolution=0.01
resolution=0.1
minValue=-100.0
defaultSpeed=0.5
defaultSpeed=1.0
sign_bit=0
monitorByPosition=false
minSpeed=0.05
minSpeed=0.1
offset=0.0
maxValue=100.0
rotation=false

View File

@@ -0,0 +1,6 @@
#Wed Dec 15 09:36:20 CET 2021
unit=K
offset=0.0
precision=3
sign_bit=0
scale=1.0

View File

@@ -53,7 +53,7 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="deviceValuePanel4" min="-2" pref="127" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonShowDetectorPanel" min="-2" pref="127" max="-2" attributes="0"/>
<Component id="buttonShowDetectorPanel" pref="127" max="32767" attributes="0"/>
</Group>
<Component id="textFOV" linkSize="1" min="-2" max="-2" attributes="0"/>
</Group>

View File

@@ -86,7 +86,7 @@ public class Eiger extends Panel {
new Thread(()->{
String fov="";
try {
fov = String.valueOf(eval("microscope.get_preset_label()", true));
fov = String.valueOf(eval("fov.take()", true));
} catch (Exception ex) {
}
String label =fov;
@@ -286,7 +286,7 @@ public class Eiger extends Panel {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(deviceValuePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonShowDetectorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(buttonShowDetectorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE))
.addComponent(textFOV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(layout.createSequentialGroup()
.addGap(86, 86, 86)

View File

@@ -61,6 +61,21 @@
<Component id="buttonAbort" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel10" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="jLabel11" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="jLabel13" alignment="1" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="deviceValuePanel1" alignment="0" min="-2" pref="117" max="-2" attributes="0"/>
<Component id="checkArrows" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="deviceValuePanel2" alignment="0" min="-2" pref="117" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
@@ -72,9 +87,24 @@
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jPanel3" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel10" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="deviceValuePanel1" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel13" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="deviceValuePanel2" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="checkArrows" min="-2" max="-2" attributes="0"/>
<Component id="jLabel11" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<Component id="buttonAbort" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -92,6 +122,13 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Component id="jLabel12" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="spinnerExpositionIntensity" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Component id="buttonStartAutoIntensity" min="-2" max="-2" attributes="0"/>
@@ -102,6 +139,10 @@
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel12" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerExpositionIntensity" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
<Component id="buttonStartAutoIntensity" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
@@ -118,6 +159,21 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonStartAutoIntensityActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel12">
<Properties>
<Property name="text" type="java.lang.String" value="Exposure:"/>
</Properties>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerExpositionIntensity">
<Properties>
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
<SpinnerModel initial="NaN" maximum="NaN" minimum="0.01" numberType="java.lang.Double" stepSize="1.0" type="number"/>
</Property>
</Properties>
<Events>
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="spinnerExpositionIntensityStateChanged"/>
</Events>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JButton" name="buttonAbort">
@@ -279,7 +335,7 @@
</Group>
</Group>
<Group type="102" attributes="0">
<EmptySpace min="-2" pref="97" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="buttonStartAutoFocus" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group>
@@ -317,7 +373,7 @@
</Group>
<EmptySpace max="32767" attributes="0"/>
<Component id="jPanel6" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="32767" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="buttonStartAutoFocus" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
@@ -500,7 +556,7 @@
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerStepStig" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -589,6 +645,41 @@
</Component>
</SubComponents>
</Container>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel1">
<Properties>
<Property name="deviceName" type="java.lang.String" value="temp_readout"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel10">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Temperature (K):"/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="checkArrows">
<Properties>
<Property name="horizontalTextPosition" type="int" value="10"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkArrowsActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel11">
<Properties>
<Property name="text" type="java.lang.String" value="Reference arrows:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel13">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="FOV:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel2">
<Properties>
<Property name="deviceName" type="java.lang.String" value="fov"/>
</Properties>
</Component>
</SubComponents>
</Container>
</SubComponents>

View File

@@ -1,3 +1,4 @@
import ch.psi.pshell.core.Context;
import ch.psi.pshell.imaging.Overlay;
import ch.psi.pshell.imaging.Overlays.Rect;
import ch.psi.pshell.imaging.Renderer;
@@ -115,6 +116,16 @@ public class Imaging extends Panel {
}
};
void showArrows(boolean show) throws Exception{
if (show){
setGlobalVar("IMAGING_RENDERER", renderer);
evalAsync("start_arrows(renderer=IMAGING_RENDERER)");
} else {
setGlobalVar("IMAGING_RENDERER", renderer);
evalAsync("stop_arrows(renderer=IMAGING_RENDERER)");
}
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
@@ -125,6 +136,8 @@ public class Imaging extends Panel {
jPanel4 = new javax.swing.JPanel();
jPanel2 = new javax.swing.JPanel();
buttonStartAutoIntensity = new javax.swing.JButton();
jLabel12 = new javax.swing.JLabel();
spinnerExpositionIntensity = new javax.swing.JSpinner();
buttonAbort = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
buttonRoiSet = new javax.swing.JButton();
@@ -155,6 +168,12 @@ public class Imaging extends Panel {
spinnerStepStig = new javax.swing.JSpinner();
jLabel9 = new javax.swing.JLabel();
spinnerExposition = new javax.swing.JSpinner();
deviceValuePanel1 = new ch.psi.pshell.swing.DeviceValuePanel();
jLabel10 = new javax.swing.JLabel();
checkArrows = new javax.swing.JCheckBox();
jLabel11 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
deviceValuePanel2 = new ch.psi.pshell.swing.DeviceValuePanel();
renderer.setMode(ch.psi.pshell.imaging.RendererMode.Fit);
@@ -167,10 +186,25 @@ public class Imaging extends Panel {
}
});
jLabel12.setText("Exposure:");
spinnerExpositionIntensity.setModel(new javax.swing.SpinnerNumberModel(NaNd, 0.01d, NaNd, 1.0d));
spinnerExpositionIntensity.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
spinnerExpositionIntensityStateChanged(evt);
}
});
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel12)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinnerExpositionIntensity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonStartAutoIntensity)
@@ -179,7 +213,10 @@ public class Imaging extends Panel {
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel12)
.addComponent(spinnerExpositionIntensity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonStartAutoIntensity)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
@@ -447,7 +484,7 @@ public class Imaging extends Panel {
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel8)
.addComponent(spinnerStepStig, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
.addGap(0, 0, 0))
);
jLabel9.setText("Exposure:");
@@ -476,7 +513,7 @@ public class Imaging extends Panel {
.addComponent(spinnerRuns, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(spinnerExposition, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel3Layout.createSequentialGroup()
.addGap(97, 97, 97)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonStartAutoFocus)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
@@ -508,11 +545,30 @@ public class Imaging extends Panel {
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonStartAutoFocus)
.addContainerGap())
);
deviceValuePanel1.setDeviceName("temp_readout");
jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel10.setText("Temperature (K):");
checkArrows.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
checkArrows.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
checkArrowsActionPerformed(evt);
}
});
jLabel11.setText("Reference arrows:");
jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel13.setText("FOV:");
deviceValuePanel2.setDeviceName("fov");
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
@@ -528,6 +584,18 @@ public class Imaging extends Panel {
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonAbort)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel11, javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel13, javax.swing.GroupLayout.Alignment.TRAILING))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(deviceValuePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(checkArrows)
.addComponent(deviceValuePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(15, 15, 15))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -538,9 +606,21 @@ public class Imaging extends Panel {
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel10)
.addComponent(deviceValuePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel13)
.addComponent(deviceValuePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(checkArrows)
.addComponent(jLabel11))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonAbort)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
@@ -636,7 +716,8 @@ public class Imaging extends Panel {
", runs=" + runs +
", renderer=IMAGING_RENDERER"+
", roi=IMAGING_ROI"+
", exposure=" + (Double.isNaN(exposure) ? "None" : exposure) + ")";
", exposure=" + (Double.isNaN(exposure) ? "None" : exposure) +
")";
this.evalAsync(cmd).handle((ret, t) -> {
if ((t != null) && (!getContext().isAborted())) {
showException((Exception) t);
@@ -650,8 +731,11 @@ public class Imaging extends Panel {
private void buttonStartAutoIntensityActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStartAutoIntensityActionPerformed
try {
//String cmd = "scan_contrast(girder_x, 0.05, 0.005, average=3)";
String cmd = "auto_intensity(roi=IMAGING_ROI)";
//String cmd = "scan_contrast(girder_x, 0.05, 0.005, average=3)";
Double exposure = (Double) spinnerExpositionIntensity.getValue();
String cmd = "auto_intensity(roi=IMAGING_ROI" +
", exposure=" + (Double.isNaN(exposure) ? "None" : exposure) +
")";
this.evalAsync(cmd).handle((ret, t) -> {
if ((t != null) && (!getContext().isAborted())) {
showException((Exception) t);
@@ -707,6 +791,18 @@ public class Imaging extends Panel {
// TODO add your handling code here:
}//GEN-LAST:event_spinnerExpositionStateChanged
private void checkArrowsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkArrowsActionPerformed
try{
showArrows(checkArrows.isSelected());
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_checkArrowsActionPerformed
private void spinnerExpositionIntensityStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerExpositionIntensityStateChanged
// TODO add your handling code here:
}//GEN-LAST:event_spinnerExpositionIntensityStateChanged
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonAbort;
private javax.swing.ButtonGroup buttonGroup1;
@@ -714,7 +810,14 @@ public class Imaging extends Panel {
private javax.swing.JButton buttonRoiSet;
private javax.swing.JButton buttonStartAutoFocus;
private javax.swing.JButton buttonStartAutoIntensity;
private javax.swing.JCheckBox checkArrows;
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel1;
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
@@ -736,6 +839,7 @@ public class Imaging extends Panel {
private ch.psi.pshell.imaging.Renderer renderer;
private javax.swing.JSpinner spinnerAverage;
private javax.swing.JSpinner spinnerExposition;
private javax.swing.JSpinner spinnerExpositionIntensity;
private javax.swing.JSpinner spinnerHeight;
private javax.swing.JSpinner spinnerRangeObj;
private javax.swing.JSpinner spinnerRangeStig;

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="79" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="ButtonNeutralizePosition" min="-2" max="-2" attributes="0"/>
<Component id="ButtonDefaultOptics10kV" min="-2" max="-2" attributes="0"/>
<Component id="ButtonDefaultOptics15kV" min="-2" max="-2" attributes="0"/>
<Component id="ButtonDefaultXrays" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="322" 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="46" max="-2" attributes="0"/>
<Component id="ButtonDefaultOptics15kV" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
<Component id="ButtonDefaultOptics10kV" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
<Component id="ButtonDefaultXrays" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="34" max="-2" attributes="0"/>
<Component id="ButtonNeutralizePosition" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="115" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="ButtonDefaultXrays">
<Properties>
<Property name="text" type="java.lang.String" value="X-rays (Default)"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ButtonDefaultXraysActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="ButtonDefaultOptics15kV">
<Properties>
<Property name="text" type="java.lang.String" value="PEEM Optics 15 kV (Default)"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ButtonDefaultOptics15kVActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="ButtonDefaultOptics10kV">
<Properties>
<Property name="text" type="java.lang.String" value="PEEM Optics 10 kV (Default)"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ButtonDefaultOptics10kVActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="ButtonNeutralizePosition">
<Properties>
<Property name="text" type="java.lang.String" value="Sample Position (Neutralize)"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="ButtonNeutralizePositionActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Form>

171
plugins/XPEEM_Settings.java Normal file
View File

@@ -0,0 +1,171 @@
import ch.psi.pshell.ui.Panel;
import ch.psi.utils.State;
/**
*
*/
public class XPEEM_Settings extends Panel {
public XPEEM_Settings() {
initComponents();
}
//Overridable callbacks
@Override
public void onInitialize(int runCount) {
}
@Override
public void onStateChange(State state, State former) {
}
@Override
public void onExecutedFile(String fileName, Object result) {
}
@Override
protected void onTimer() {
}
@Override
protected void onLoaded() {
}
@Override
protected void onUnloaded() {
}
//Invoked by 'update()' to update components in the event thread
@Override
protected void doUpdate() {
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
ButtonDefaultXrays = new javax.swing.JButton();
ButtonDefaultOptics15kV = new javax.swing.JButton();
ButtonDefaultOptics10kV = new javax.swing.JButton();
ButtonNeutralizePosition = new javax.swing.JButton();
ButtonDefaultXrays.setText("X-rays (Default)");
ButtonDefaultXrays.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ButtonDefaultXraysActionPerformed(evt);
}
});
ButtonDefaultOptics15kV.setText("PEEM Optics 15 kV (Default)");
ButtonDefaultOptics15kV.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ButtonDefaultOptics15kVActionPerformed(evt);
}
});
ButtonDefaultOptics10kV.setText("PEEM Optics 10 kV (Default)");
ButtonDefaultOptics10kV.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ButtonDefaultOptics10kVActionPerformed(evt);
}
});
ButtonNeutralizePosition.setText("Sample Position (Neutralize)");
ButtonNeutralizePosition.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ButtonNeutralizePositionActionPerformed(evt);
}
});
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(79, 79, 79)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(ButtonNeutralizePosition)
.addComponent(ButtonDefaultOptics10kV)
.addComponent(ButtonDefaultOptics15kV)
.addComponent(ButtonDefaultXrays))
.addContainerGap(322, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(46, 46, 46)
.addComponent(ButtonDefaultOptics15kV)
.addGap(36, 36, 36)
.addComponent(ButtonDefaultOptics10kV)
.addGap(36, 36, 36)
.addComponent(ButtonDefaultXrays)
.addGap(34, 34, 34)
.addComponent(ButtonNeutralizePosition)
.addContainerGap(115, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
private void ButtonDefaultXraysActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonDefaultXraysActionPerformed
try {
evalAsync("xrays_default()").handle((ret,ex)->{
if (ex!=null){
showException((Exception)ex);
}
return ret;
});
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_ButtonDefaultXraysActionPerformed
private void ButtonDefaultOptics15kVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonDefaultOptics15kVActionPerformed
try {
evalAsync("peem_optics_default_15kV()").handle((ret,ex)->{
if (ex!=null){
showException((Exception)ex);
}
return ret;
});
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_ButtonDefaultOptics15kVActionPerformed
private void ButtonDefaultOptics10kVActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonDefaultOptics10kVActionPerformed
try {
evalAsync("peem_optics_default_10kV()").handle((ret,ex)->{
if (ex!=null){
showException((Exception)ex);
}
return ret;
});
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_ButtonDefaultOptics10kVActionPerformed
private void ButtonNeutralizePositionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ButtonNeutralizePositionActionPerformed
try {
evalAsync("neutralize_position()").handle((ret,ex)->{
if (ex!=null){
showException((Exception)ex);
}
return ret;
});
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_ButtonNeutralizePositionActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton ButtonDefaultOptics10kV;
private javax.swing.JButton ButtonDefaultOptics15kV;
private javax.swing.JButton ButtonDefaultXrays;
private javax.swing.JButton ButtonNeutralizePosition;
// End of variables declaration//GEN-END:variables
}

View File

@@ -4,21 +4,25 @@
open_vg13()
time.sleep(1)
#v_apply = -40
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
TRZ.write(33.8)
sample_name='2nm_'
#XMCD
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
#caput('X11MA-ES3-MAG1:V', 5)
sample_name='M4_150'
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
for i in range(1):
#time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=700, end=715, time=1, delay=1, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+ sample_name + str(v_apply) + '_Cp')
#otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
#otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
#otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
#otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
close_vg13()

View File

@@ -0,0 +1,274 @@
open_vg13()
time.sleep(1)
'''
#XMCD
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(18.4)
sample_name='8nm'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(26.4)
sample_name='3nm'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(33.8)
sample_name='2nm'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
'''
# HYST
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
# repeat loops
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(18.4)
sample_name='8nm'
# HYST
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(26.4)
sample_name='3nm'
# HYST
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(33.8)
sample_name='2nm'
# HYST
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 5.0 # starting mag. field in Amps
B2 = -5.0 # final mag. field in Amps
BSTEP = 0.1 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
close_vg13()

View File

@@ -0,0 +1,283 @@
open_vg13()
time.sleep(1)
v_apply = 150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
#v_apply = 0
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
#XMCD
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(18.4)
sample_name='2nm_150V'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
caput('X11MA-ES3-MAG1:V', 2.5) # max Kepco current
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
v_apply = -40
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
#v_apply = 0
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='2nm_-40V'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
caput('X11MA-ES3-MAG1:V', 2.5) # max Kepco current
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
v_apply = -150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
#v_apply = 0
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='2nm_-150V'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
caput('X11MA-ES3-MAG1:V', 2.5) # max Kepco current
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
v_apply = 70
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
#v_apply = 0
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='2nm_+70V'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
caput('X11MA-ES3-MAG1:V', 2.5) # max Kepco current
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
v_apply = 150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
v_apply = 0
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
#XMCD
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
TRZ.write(18.4)
sample_name='2nm_0V'
for i in range(3):
#time.sleep(1)
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=760, time=4, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
# HYST
caput('X11MA-ES3-MAG1:V', 2.5) # max Kepco current
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
close_vg13()

View File

@@ -0,0 +1,24 @@
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 5)
#time.sleep(15)
sample_name='2nm'
#caput('X11MA-KEI10:RANGE', 7)
#caput('X11MA-KEI11:RANGE', 7)
#caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
#time.sleep(1)
otf2(start=705, end=713, time=1, delay=1, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
otf2(start=705, end=713, time=1, delay=1, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-10.0, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')
close_vg13()

View File

@@ -0,0 +1,2 @@
sample_name='3nm_z26p9'
otf2(start=705, end=713, time=1, delay=1, mode='CIRC +', alpha = 0.0, offset=-9.0, name='Fe_'+sample_name + '_Cp')

View File

@@ -1,22 +1,31 @@
v_start= -20
v_end = 0
#v_apply = 0
close_vg13()
v_start=caget('X11MA-KEI13:SETVOLTAGE')
caput('X11MA-KEI13:RANGE',0) # 0= auto range. To protect Keithley
step_size=5
n=(v_start - v_end)/step_size
n=(v_start - v_apply)/step_size
for i in range (int(abs(n))+1):
if v_start > v_end:
if v_start > v_apply:
v=v_start - i*step_size
#print "reverse"
print ("Apply", v," volts")
caput('X11MA-KEI11:SETVOLTAGE',v)
caput('X11MA-KEI13:SETVOLTAGE',v)
sleep(0.1)
else:
v= i*step_size+v_start
print "forward"
print ("Apply", v," volts")
caput('X11MA-KEI11:SETVOLTAGE',v)
caput('X11MA-KEI13:SETVOLTAGE',v)
sleep(0.1)
sleep(20)
open_vg13()

10
script/Users/Cinthia/field_sweepID2.py Executable file → Normal file
View File

@@ -1,6 +1,6 @@
#Parameters
sample_name='M4_120'
#sample_name='M4_120'
'''
FILENAME='Hyst_'+ sample_name + '_E2_Cm'
B1 = 1.0 # starting mag. field in Amps
@@ -58,8 +58,8 @@ for r in RANGES:
setpoints = setpoints + frange(r[0], r[1], r[2], True)
# plot properties
set_preference(Preference.ENABLED_PLOTS, ['field', 'tey_norm'])
set_preference(Preference.PLOT_TYPES, {'tey_norm':1})
set_preference(Preference.ENABLED_PLOTS, ['field', 'tey_norm'], ['field','tfy_norm'])
set_preference(Preference.PLOT_TYPES, {'tey_norm':1},{'tfy_norm':1})
#scan = ManualScan(['field', 'Energy'], ['TEY', 'I0', 'polarization', 'temperature', 'RingCurrent', 'tey_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan = ManualScan(['field', 'Energy'], ['I0', 'TEY', 'TFY', 'polarization', 'temperature', 'RingCurrent', 'tey_norm','tfy_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
@@ -77,8 +77,12 @@ for B in setpoints:
while abs(readback1-B) > FIELD_PRECISION:
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
print "Wait field is set"
time.sleep(0.1)
print "field setting done"
print "field readback is:", field.read()
for E in ENERGIES:
print "Setting energy = ", E
#caput('X11PHS-E:GO.A', E)

View File

@@ -0,0 +1,124 @@
#Parameters
#sample_name='M4_120'
'''
FILENAME='Hyst_'+ sample_name + '_E2_Cm'
B1 = 1.0 # starting mag. field in Amps
B2 = -1.0 # final mag. field in Amps
BSTEP = 0.5 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 # time in 100ms
'''
# List of scans. Each scan is defined as: (start,stop, step)
# to make a whole loop two scans are needed: [(B1, B2, BSTEP),(B2,B1,-BSTEP)]
# to make half of a loop one scan is needed: [(B1, B2, BSTEP),] <- don't forget to put comma before ]
RANGES = [(B1, B2, -BSTEP1),(B2, -B2, -BSTEP2),(-B2,-B1,-BSTEP1),(-B1,-B2,BSTEP1),(-B2,B2,BSTEP2),(B2,B1,BSTEP1)]
set_exec_pars(open=False, tag=FILENAME)
#open_vg13()
#Pre-actions
# Here polarization and offsets are set
caput ("X11PHS-E:OPT","PGM+ID2")
print "ID mode set to PGM+ID2"
#caput(OTF_OFF1,-50) #detune ID1
caput('X11MA-ID2:ENERGY-OFFS', OFFSET2)
print "ID offset set to ", OFFSET2
cawait('X11MA-ID2:DONE',1)
print "Offset setting done"
if MODE is 1 or 2:
caput('X11MA-ID2:MODE',MODE)
#print "Polarization mode set"
else:
raise Exception("Invalid polarization type: " + MODE)
cawait('X11MA-ID2:DONE',1)
print "ID mode setting done"
# setting number of samples to be averaged, which depends on the accumulation time
avg = ACC_TIME * 10
caput("X11MA-ES1-10ADC:AVG",avg)
# Generating a list of mag. fields (setpoints) needed for the loop
setpoints = []
for r in RANGES:
setpoints = setpoints + frange(r[0], r[1], r[2], True)
# plot properties
set_preference(Preference.ENABLED_PLOTS, ['field', 'tey_norm'])
set_preference(Preference.PLOT_TYPES, {'tey_norm':1})
#scan = ManualScan(['field', 'Energy'], ['TEY', 'I0', 'polarization', 'temperature', 'RingCurrent', 'tey_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan = ManualScan(['field', 'Energy'], ['I0', 'TEY', 'TFY', 'polarization', 'temperature', 'RingCurrent', 'tey_norm','tfy_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan.start()
# Main loop
for B in setpoints:
print "Setting field = ", B
caput("X11MA-XMCD:I-SETraw",B)
time.sleep( FIELD_CHANGE_SLEEP ) # Settling time
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
while abs(readback1-B) > FIELD_PRECISION:
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
print "difference", abs(readback1-B)
time.sleep(0.1)
time.sleep( FIELD_CHANGE_SLEEP ) # Settling time
print "field setting done"
print "field readback is:", field.read()
for E in ENERGIES:
print "Setting energy = ", E
#caput('X11PHS-E:GO.A', E)
energy.write(E)
time.sleep (0.1)
print "Energy set"
cawait('X11PHS:alldone', 1)
print "done"
readback2 = energy.read()
if abs(readback2 - E) > 0.1 : # TODO: Check accuracy
raise Exception('Energy could not be set to the value ' + str(E))
sleep( ENERGY_CHANGE_SLEEP ) # Settling time
detector1 = keithley_1a.read() #Keithley1
detector2 = keithley_2a.read() #Keithley2
detector3 = keithley_3a.read() #Keithley3
detector4 = caget('X11MA-ID2:MODE') #polarization in ID2
#detector5 = caget("X11MA-ID2:ALPHA-READ") # polAngle in ID2
detector6 = caget('X11MA-ES3-LSCI:TEMP_RBV') #temperature.get()
detector7 = caget("ARIDI-PCT:CURRENT")
#detector8 = signal_field_analog_x.read() # fieldAnalogX.get()
tey_norm = detector2/detector1
tfy_norm = detector3/detector1
#converting polarization strings to integer numbers: C+ -> 1 and C- -> 2
if detector4 == 'CIRC +': detector4 = 1
elif detector4 == 'CIRC -': detector4 = 2
else: detector4 = 0
#print "step 7"
#scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector4, detector6, detector7, tey_norm])
scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector3, detector4, detector6, detector7, tey_norm, tfy_norm])
scan.end()
caput("X11MA-ES1-10ADC:AVG",1)
#close_vg13()

30
script/Users/Cinthia/hyst_ID2_Fe.py Executable file → Normal file
View File

@@ -1,24 +1,27 @@
open_vg13()
sample_name='M4_120'
TRZ.write(18.4)
sample_name='8nm'
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
#caput('X11MA-KEI10:RANGE', 7)
#caput('X11MA-KEI11:RANGE', 7)
#caput('X11MA-KEI12:RANGE', 9)
# HYST
caput('X11MA-ES3-MAG1:V', 2.5) # max Kepco current
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
B1 = 2.5 # starting mag. field in Amps
B2 = -2.5 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
ENERGIES = (700,709) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
OFFSET2 = -10.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
@@ -26,17 +29,18 @@ for i in range(1):
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
B1 = 2.5 # starting mag. field in Amps
B2 = -2.5 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
ENERGIES = (700,709) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
OFFSET2 = -9.0 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
close_vg13()

View File

@@ -0,0 +1,486 @@
'''
TRZ.write(33.8)
sample_name='2nm_150'
v_apply = 150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
#cawait ('ACOAU-ACCU:OP-MODE', "Light-Available") # wait for electron beam to be back
#sleep(0.5)
sample_name='2nm_150_rem'
v_apply = 0
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
'''
sample_name='2nm_-40'
v_apply = -20
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_-60'
v_apply = -40
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_-80'
v_apply = -60
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_-100'
v_apply = -80
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_-150'
v_apply = -100
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
'''
sample_name='2nm_-150_rem'
v_apply = 0
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_40'
v_apply = 40
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_60'
v_apply = 60
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_80'
v_apply = 80
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_100'
v_apply = 100
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
sample_name='2nm_150'
v_apply = 150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI13:RANGE',7) # 6=200nA 7=20nA. Measurement settings. Apply voltage puts it to auto-range
open_vg13()
sleep(10)
#HYST
for i in range(1):
B1 = 2.5 # max mag. field in Amps
B2 = 1.0 # intermediate mag field in Amps
BSTEP1 = 0.1 # step size mag. field in Amps. between B1 and B2
BSTEP2 = 0.04 # step size mag. field in Amps. between B2 and -B2
ENERGIES = (709,709) #list of energies in eV
FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='Hyst_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -9.0 #ID2 offset
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2_regions.py')
'''
close_vg13()

View File

@@ -0,0 +1,123 @@
#Parameters
#sample_name='M4_120'
'''
FILENAME='Hyst_'+ sample_name + '_E2_Cm'
B1 = 1.0 # starting mag. field in Amps
B2 = -1.0 # final mag. field in Amps
BSTEP = 0.5 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 # time in 100ms
'''
# List of scans. Each scan is defined as: (start,stop, step)
# to make a whole loop two scans are needed: [(B1, B2, BSTEP),(B2,B1,-BSTEP)]
# to make half of a loop one scan is needed: [(B1, B2, BSTEP),] <- don't forget to put comma before ]
RANGES = [(B1, B2, -BSTEP),(B2,B1,BSTEP)]
set_exec_pars(open=False, tag=FILENAME)
#open_vg13()
#Pre-actions
# Here polarization and offsets are set
caput ("X11PHS-E:OPT","PGM+ID2")
print "ID mode set to PGM+ID2"
#caput(OTF_OFF1,-50) #detune ID1
caput('X11MA-ID2:ENERGY-OFFS', OFFSET2)
print "ID offset set to ", OFFSET2
cawait('X11MA-ID2:DONE',1)
print "Offset setting done"
if MODE is 1 or 2:
caput('X11MA-ID2:MODE',MODE)
#print "Polarization mode set"
else:
raise Exception("Invalid polarization type: " + MODE)
cawait('X11MA-ID2:DONE',1)
print "ID mode setting done"
# setting number of samples to be averaged, which depends on the accumulation time
avg = ACC_TIME * 10
caput("X11MA-ES1-10ADC:AVG",avg)
# Generating a list of mag. fields (setpoints) needed for the loop
setpoints = []
for r in RANGES:
setpoints = setpoints + frange(r[0], r[1], r[2], True)
# plot properties
set_preference(Preference.ENABLED_PLOTS, ['field', 'tey_norm'])
set_preference(Preference.PLOT_TYPES, {'tey_norm':1})
#scan = ManualScan(['field', 'Energy'], ['TEY', 'I0', 'polarization', 'temperature', 'RingCurrent', 'tey_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan = ManualScan(['field', 'Energy'], ['I0', 'TEY', 'TFY', 'polarization', 'temperature', 'RingCurrent', 'tey_norm','tfy_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan.start()
# Main loop
for B in setpoints:
print "Setting field = ", B
caput("X11MA-XMCD:I-SETraw",B)
time.sleep( FIELD_CHANGE_SLEEP ) # Settling time
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
while abs(readback1-B) > FIELD_PRECISION:
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
print "Wait field is set"
time.sleep(0.1)
print "field setting done"
print "field readback is:", field.read()
for E in ENERGIES:
print "Setting energy = ", E
#caput('X11PHS-E:GO.A', E)
energy.write(E)
time.sleep (0.1)
print "Energy set"
cawait('X11PHS:alldone', 1)
print "done"
readback2 = energy.read()
if abs(readback2 - E) > 0.1 : # TODO: Check accuracy
raise Exception('Energy could not be set to the value ' + str(E))
sleep( ENERGY_CHANGE_SLEEP ) # Settling time
detector1 = keithley_1a.read() #Keithley1
detector2 = keithley_2a.read() #Keithley2
detector3 = keithley_3a.read() #Keithley3
detector4 = caget('X11MA-ID2:MODE') #polarization in ID2
#detector5 = caget("X11MA-ID2:ALPHA-READ") # polAngle in ID2
detector6 = caget('X11MA-ES3-LSCI:TEMP_RBV') #temperature.get()
detector7 = caget("ARIDI-PCT:CURRENT")
#detector8 = signal_field_analog_x.read() # fieldAnalogX.get()
tey_norm = detector2/detector1
tfy_norm = detector3/detector1
#converting polarization strings to integer numbers: C+ -> 1 and C- -> 2
if detector4 == 'CIRC +': detector4 = 1
elif detector4 == 'CIRC -': detector4 = 2
else: detector4 = 0
#print "step 7"
#scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector4, detector6, detector7, tey_norm])
scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector3, detector4, detector6, detector7, tey_norm, tfy_norm])
scan.end()
caput("X11MA-ES1-10ADC:AVG",1)
#close_vg13()

View File

@@ -0,0 +1,120 @@
#Parameters
sample_name='8nm_0p16A'
ENERGIES = (709,709) #list of energies in eV
#FIELD_PRECISION = 0.035 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
#caput('X11MA-ES3-MAG1:V', B1) # set Kepco to max current for hyst loop
FILENAME='V_'+ sample_name + '_Cm'
OFFSET2 = -10.0 #ID2 offset
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
# List of scans. Each scan is defined as: (start,stop, step)
# to make a whole loop two scans are needed: [(B1, B2, BSTEP),(B2,B1,-BSTEP)]
# to make half of a loop one scan is needed: [(B1, B2, BSTEP),] <- don't forget to put comma before ]
#RANGES = [(B1, B2, -BSTEP1),(B2, -B2, -BSTEP2),(-B2,-B1,-BSTEP1),(-B1,-B2,BSTEP1),(-B2,B2,BSTEP2),(B2,B1,BSTEP1)]
RANGES = [(150, 0, -20),(0, -150, -5),(-150,0,20),(0, 150,5)]
set_exec_pars(open=False, tag=FILENAME)
#open_vg13()
#Pre-actions
# Here polarization and offsets are set
caput ("X11PHS-E:OPT","PGM+ID2")
print "ID mode set to PGM+ID2"
#caput(OTF_OFF1,-50) #detune ID1
caput('X11MA-ID2:ENERGY-OFFS', OFFSET2)
print "ID offset set to ", OFFSET2
cawait('X11MA-ID2:DONE',1)
print "Offset setting done"
if MODE is 1 or 2:
caput('X11MA-ID2:MODE',MODE)
#print "Polarization mode set"
else:
raise Exception("Invalid polarization type: " + MODE)
cawait('X11MA-ID2:DONE',1)
print "ID mode setting done"
# setting number of samples to be averaged, which depends on the accumulation time
avg = ACC_TIME * 10
caput("X11MA-ES1-10ADC:AVG",avg)
# Generating a list of mag. fields (setpoints) needed for the loop
setpoints = []
for r in RANGES:
setpoints = setpoints + frange(r[0], r[1], r[2], True)
# plot properties
set_preference(Preference.ENABLED_PLOTS, ['field', 'tfy_norm'])
set_preference(Preference.PLOT_TYPES, {'tfy_norm':1})
scan = ManualScan(['field', 'Energy'], ['I0', 'TEY', 'TFY', 'polarization', 'temperature', 'RingCurrent', 'tey_norm','tfy_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
#scan = ManualScan(['field'], ['Energy','I0', 'TEY', 'TFY', 'polarization', 'temperature', 'RingCurrent', 'tey_norm','tfy_norm'] , [min(setpoints)], [max(setpoints)], [len(setpoints)-1])
scan.start()
# Main loop
for B in setpoints:
print "Setting field = ", B
caput("X11MA-KEI13:SETVOLTAGE",B)
time.sleep( FIELD_CHANGE_SLEEP ) # Settling time
#time.sleep(0.5)
readback1 = caget('X11MA-KEI13:SETVOLTAGE')
#print "field setting done"
#print "field readback is:", field.read()
for E in ENERGIES:
print "Setting energy = ", E
#caput('X11PHS-E:GO.A', E)
energy.write(E)
time.sleep (0.1)
print "Energy set"
cawait('X11PHS:alldone', 1)
print "done"
readback2 = energy.read()
if abs(readback2 - E) > 0.1 : # TODO: Check accuracy
raise Exception('Energy could not be set to the value ' + str(E))
sleep( ENERGY_CHANGE_SLEEP ) # Settling time
detector1 = energy.read()
detector2 = keithley_1a.read() #Keithley1
detector3 = keithley_2a.read() #Keithley2
detector4 = keithley_3a.read() #Keithley3
detector5 = caget('X11MA-ID2:MODE') #polarization in ID2
#detector5 = caget("X11MA-ID2:ALPHA-READ") # polAngle in ID2
detector6 = caget('X11MA-ES3-LSCI:TEMP_RBV') #temperature.get()
detector7 = caget("ARIDI-PCT:CURRENT")
#detector8 = signal_field_analog_x.read() # fieldAnalogX.get()
tey_norm = detector2/detector1
tfy_norm = detector3/detector1
#converting polarization strings to integer numbers: C+ -> 1 and C- -> 2
if detector4 == 'CIRC +': detector4 = 1
elif detector4 == 'CIRC -': detector4 = 2
else: detector4 = 0
#print "step 7"
#scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector4, detector6, detector7, tey_norm])
scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector3, detector4, detector6, detector7, tey_norm, tfy_norm])
scan.end()
caput("X11MA-ES1-10ADC:AVG",1)
#close_vg13()

View File

@@ -0,0 +1,34 @@
#auto_intensity()
#time_sleep(2)
#TakeImage at 710 eV at the given polarization
# do autoajust, give 1 minute to settle, do image aquisition with 5 frame average and go to sleep after
# entire run should take 10 min per loop execution
#Constants
# otf_img(700, 750, time=1, delay = 0.1, exposure=0.2, roi="test", name="test", save_images=True)
AVERAGE1 = 1
AVERAGE2 = 5
EXPOSURE1 = 0.5
EXPOSURE2 = 1.0
MEASUREMENTS = 1
i = 0
#change_energy(709.4)
time.sleep(20)
for i in range(0, 30):
# open_vg10()
#time.sleep(1)
#auto_intensity()
#close_vg10()
time.sleep(30)
#open_vg10()
#otf_img(704, 720, time=1.5, delay = 0.1, exposure=0.5, roi="test", name="400C_H2", save_images=True)
#time.sleep(10)
#close_vg10()
abs_spec(ranges="Fe_L3__Arik_Beck_fine", roi="test", switch_pol = False, scans=1, exposure=EXPOSURE1, average=AVERAGE1)
time.sleep(10)
change_energy(709.4)
time.sleep(10)
take_image(scans=1, switch_pol=False, measurements=MEASUREMENTS, exposure=EXPOSURE1, average=AVERAGE2)
time.sleep(270)
print(i)

View File

@@ -0,0 +1,22 @@
#auto_intensity()
#time_sleep(2)
#TakeImage at 710 eV at the given polarization
# do autoajust, give 1 minute to settle, do image aquisition with 5 frame average and go to sleep after
# entire run should take 10 min per loop execution
#Constants
AVERAGE = 5
EXPOSURE = 1.0
MEASUREMENTS = 1
i = 0
change_energy(709.4)
time.sleep(60)
for i in range(0, 23):
# open_vg10()
#time.sleep(1)
#auto_intensity()
#close_vg10()
time.sleep(60)
take_image(scans=1, switch_pol=False, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(534)
print(i)

View File

@@ -0,0 +1,23 @@
#Constants
AVERAGE = 1
EXPOSURE = 2.0
MEASUREMENTS = 50
Energies=[]
step=0.2
for item in range(0,20,1):
Energies.append(round(642.0 - item*step, 1))
#Energies=[ 640.8,641,641.2,641.4,641.6,] #5 maximum
#Energies=[637, 637.2, 637.4, 637.6, 637.8, 638, 638.2, 638.4, 638.6, 638.8, 639, 639.2, 639.4, 639.6, 639.8, 640, 640.5, 641]
#TakeImage at 710 eV at the given polarization
change_energy(638.2)
#TwoImages Two Pol with C+/C- and ID1 + ID2, tune-detune, at 710 eV
set_beamline_setup(id ="ID1_ID2", en=638.2, pol1="Circ_Plus", alp1=0.0, har1=1, off1=0.0, pol2="Circ_Minus", alp2=0.0, har2=1, off2=0.0)
time.sleep(2.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
for item in Energies:
change_energy(item)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)

View File

@@ -0,0 +1,49 @@
#Constants
AVERAGE = 3
EXPOSURE = 2.0
MEASUREMENTS = 50
#TakeImage at 710 eV at the given polarization
change_energy(639)
#take_image(scans=1, switch_pol=False, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoImages Two Pol with Lin_hor/lin_ver and ID1 + ID2, tune-detune, at 638.8 eV
set_beamline_setup(id ="ID1_ID2", en=638.8, pol1="Lin_Hor", alp1=0.0, har1=1, off1=0.0, pol2="Lin_Ver", alp2=90.0, har2=1, off2=0.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
change_energy(637.5)
time.sleep(2.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoImages Two Pol with C+/C- and ID1 + ID2, tune-detune, at 710 eV
set_beamline_setup(id ="ID1_ID2", en=638.2, pol1="Circ_Plus", alp1=0.0, har1=1, off1=0.0, pol2="Circ_Minus", alp2=0.0, har2=1, off2=0.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoEnergies with lin hor polarization ID2 only (normal)
#set_beamline_setup(id ="ID2", en=710, pol1="Lin_Hor")
#two_energies(705, 710, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
#time.sleep(2.0)
#abs_spec(ranges=[[500.0, 1000.0, 100.0],], switch_pol=False, scans=1, exposure=EXPOSURE, average=AVERAGE) #Use manulally defined ranges and rois defined in GUI
#abs_spec(ranges="C_edge", roi="test", switch_pol=False, scans=1, exposure=EXPOSURE, average=AVERAGE)
#manip_x.write(0.1)
#Direct functions to change energy, pol, offset:
#change_energy(700)
#change_pol(1, "Circ_Plus" ) #Pol on ID1: "Circ_Plus", "Circ_Minus" , "Lin_Hor", "Lin_Ver"
#change_pol(1, "Lin" , alpha = "0" ) #Lin pol on ID 1
#change_offset(1, 0.0) #offset on ID1
#Auto-switching:
#switch_pol()
#Restoring beamline state defined in last set_beamline_setut:
#restore_beamline_setup()

View File

@@ -0,0 +1,29 @@
#Constants
AVERAGE = 1
EXPOSURE = 1.0
MEASUREMENTS = 50
positions=[-510, -525, -540, -555, -570, -585]
for position in positions:
manip_x.write(position)
time.sleep(60)
#auto_intensity()
#time_sleep(2)
#TakeImage at 710 eV at the given polarization
change_energy(638.8)
#take_image(scans=1, switch_pol=False, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoImages Two Pol with Lin_hor/lin_ver and ID1 + ID2, tune-detune, at 638.8 eV
set_beamline_setup(id ="ID1_ID2", en=638.8, pol1="Lin_Hor", alp1=0.0, har1=1, off1=0.0, pol2="Lin_Ver", alp2=90.0, har2=1, off2=0.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
change_energy(638.0)
time.sleep(2.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoImages Two Pol with C+/C- and ID1 + ID2, tune-detune, at 710 eV
set_beamline_setup(id ="ID1_ID2", en=638.2, pol1="Circ_Plus", alp1=0.0, har1=1, off1=0.0, pol2="Circ_Minus", alp2=0.0, har2=1, off2=0.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)

View File

@@ -0,0 +1,32 @@
#Constants
AVERAGE = 4
EXPOSURE = 2.0
MEASUREMENTS = 50
#TakeImage at 710 eV at the given polarization
#change_energy(639)
#take_image(scans=1, switch_pol=False, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
#time.sleep(2.0)
#TwoImages Two Pol with Lin_hor/lin_ver and ID1 + ID2, tune-detune, at 638.8 eV
#set_beamline_setup(id ="ID1_ID2", en=638.9, pol1="Lin_Hor", alp1=0.0, har1=1, off1=0.0, pol2="Lin_Ver", alp2=90.0, har2=1, off2=0.0)
#two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
#time.sleep(2.0)
for i in range(1):
change_energy(638.2)
time.sleep(2.0)
#TwoImages Two Pol with C+/C- and ID1 + ID2, tune-detune, at 710 eV
set_beamline_setup(id ="ID1_ID2", en=638.2, pol1="Circ_Plus", alp1=0.0, har1=1, off1=0.0, pol2="Circ_Minus", alp2=0.0, har2=1, off2=0.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
change_energy(637.6)
time.sleep(2.0)
set_beamline_setup(id ="ID1_ID2", en=637.6, pol1="Lin_Hor", alp1=0.0, har1=1, off1=0.0, pol2="Lin_Ver", alp2=90.0, har2=1, off2=0.0)
time.sleep(2.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)

View File

@@ -0,0 +1,174 @@
#otf(start, end, time, delay = 0.0, mode = None, offset = None, alpha = None, name = None, folder = 'TEST')
#Sample M1
#TRY.write(-1.5)
#TRZ.write(14)
#time.sleep(30)
#open_vg13()
#time.sleep(1)
#caput('X11MA-ES3-MAG1:V', 2)
#time.sleep(15)
#caput('X11MA-KEI10:RANGE', 7)
#caput('X11MA-KEI11:RANGE', 8)
#caput('X11MA-KEI12:RANGE', 9)
#for i in range(2):
# time.sleep(1)
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M1_Cp')
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M1_Cm')
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M1_Cm')
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M1_Cp')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M1_LH')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M1_LV')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M1_LV')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M1_LH')
#Sample M2
#TRY.write(-0.9)
#TRZ.write(22.5)
#time.sleep(30)
#open_vg13()
#time.sleep(1)
#caput('X11MA-ES3-MAG1:V', 2)
#time.sleep(15)
#caput('X11MA-KEI10:RANGE', 7)
#caput('X11MA-KEI11:RANGE', 8)
#caput('X11MA-KEI12:RANGE', 9)
#for i in range(2):
# time.sleep(1)
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M2_Cp')
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M2_Cm')
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M2_Cm')
# otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M2_Cp')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M2_LH')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M2_LV')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M2_LV')
#otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M2_LH')
#Sample M3
TRY.write(-0.9)
TRZ.write(30)
time.sleep(30)
open_vg13()
time.sleep(1)
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)#Changed th gain to 9 due to saturation
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M3_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M3_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M3_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M3_Cp')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M3_LH')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M3_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M3_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M3_LH')
#Sample M6
TRY.write(2.0)
TRZ.write(30.0)
time.sleep(30)
open_vg13()
time.sleep(1)
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M6_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M6_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M6_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M6_Cp')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M6_LH')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M6_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M6_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M6_LH')
#Sample M5
TRY.write(2.0)
TRZ.write(24.5)
time.sleep(30)
open_vg13()
time.sleep(1)
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_Cp')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M5_LH')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M5_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M5_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M5_LH')
#Sample M4
TRY.write(1.0)
TRZ.write(18)
time.sleep(30)
open_vg13()
time.sleep(1)
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M4_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M4_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M4_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M4_Cp')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M4_LH')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M4_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 90.0, offset=-1.2, name='Ti_M4_LV')
otf2(start=450, end=475, time=3.0, delay=10, mode='LINEAR', alpha = 0.0, offset=-1.2, name='Ti_M4_LH')
close_vg13()

View File

@@ -0,0 +1,24 @@
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
sample_name='M4_150'
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
#time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
close_vg13()

View File

@@ -0,0 +1,763 @@
#otf(start, end, time, delay = 0.0, mode = None, offset = None, alpha = None, name = None, folder = 'TEST')
#Sample M5 30V
'''
TRY.write(2.0)
TRZ.write(24.5)
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:VOLTOUT','ON')
caput('X11MA-KEI11:SETVOLTAGE',0)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',30)
time.sleep(10)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_30_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_30_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_30_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_30_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_30_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_30_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5 -30
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',0)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-5)
time.sleep(1)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-30)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-30_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-30_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-30_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-30_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_-30_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_-30_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5 -50V
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',-35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-50)
time.sleep(10)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-50_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-50_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-50_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-50_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_-50_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_-50_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5 50V
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',-45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',0)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',50)
time.sleep(10)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_50_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_50_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_50_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_50_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_50_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_50_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5 70V
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',55)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',65)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',70)
time.sleep(10)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_70_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_70_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_70_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_70_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_70_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_70_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5 -70V
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',65)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',60)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',55)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',50)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',0)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-50)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-55)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-60)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-65)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-70)
time.sleep(10)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-70_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-70_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-70_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-70_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_-70_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_-70_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5 -100V
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',-75)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-80)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-85)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-90)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-95)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-100)
time.sleep(10)
'''
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-100_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_-100_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_-100_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#M5 100V
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI11:SETVOLTAGE',-95)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-90)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-85)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-80)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-75)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-70)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-65)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-60)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-55)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-50)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',-5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',0)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',50)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',55)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',60)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',65)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',70)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',75)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',80)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',85)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',95)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',100)
time.sleep(10)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_100_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_100_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_100_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_100_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_100_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_100_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
caput('X11MA-KEI11:SETVOLTAGE',95)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',90)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',85)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',80)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',75)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',70)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',65)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',60)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',55)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',50)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',45)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',40)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',35)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',30)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',25)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',0)
caput('X11MA-KEI11:VOLTOUT','OFF')
close_vg13()

View File

@@ -0,0 +1,67 @@
#otf(start, end, time, delay = 0.0, mode = None, offset = None, alpha = None, name = None, folder = 'TEST')
#Sample M5
TRY.write(2.0)
TRZ.write(24.5)
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
sample_name='M5_100_-20'
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
close_vg13()

View File

@@ -0,0 +1,78 @@
#otf(start, end, time, delay = 0.0, mode = None, offset = None, alpha = None, name = None, folder = 'TEST')
#Sample M5
TRY.write(2.0)
TRZ.write(24.5)
open_vg13()
time.sleep(1)
#XMCD
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
'''
caput('X11MA-KEI11:VOLTOUT','ON')
#caput('X11MA-KEI11:VOLTOUT',1)
caput('X11MA-KEI11:SETVOLTAGE',5)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',10)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',15)
time.sleep(1)
caput('X11MA-KEI11:SETVOLTAGE',20)
'''
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)
for i in range(2):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-20_0_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-20_0_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_M5_-20_0_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_M5_-20_0_Cp')
#HYST
'''
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="Hyst_M5_-20_0_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="Hyst_M5_-20_0_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
'''
close_vg13()

View File

@@ -0,0 +1,613 @@
#otf(start, end, time, delay = 0.0, mode = None, offset = None, alpha = None, name = None, folder = 'TEST')
#Sample M6 150
TRY.write(2.0)
TRZ.write(30.0)
open_vg13()
time.sleep(1)
'''
#XMCD
sample_name='M6_150'
v_start =0
v_end = 150
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
sample_name='M6_150_-20'
v_start =150
v_end = -20
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
#sample_name='M6_-150'
v_start =-20
v_end = -150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='M6_-150'
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
#sample_name='M6_-150_55'
v_start =-150
v_end = 55
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='M6_-150_55'
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
#sample_name='M6_150_0'
v_start =55
v_end = 150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
v_start =150
v_end = 0
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='M6_150_0'
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
#sample_name='M6_-150_0'
v_start =0
v_end = -150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
v_start =-150
v_end = 0
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='M6_-150_0'
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
#sample_name='M6_150'
v_start =0
v_end = 150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
'''
sample_name='M6_150'
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
sample_name='M6_150_-20'
v_start =150
v_end = -20
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 8)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
#sample_name='M6_-150'
v_start =-20
v_end = -150
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
sample_name='M6_-150'
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#XMCD
sample_name='M6_-150_55'
v_start =-150
v_end = 55
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-ES3-MAG1:V', 2)
time.sleep(15)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
time.sleep(1)
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC +', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cp')
otf2(start=695, end=740, time=3, delay=10, mode='CIRC -', alpha = 0.0, offset=-1.2, name='Fe_'+sample_name + '_Cm')
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
v_start =55
v_end = 0
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/apply_voltage.py')
caput('X11MA-KEI11:VOLTOUT','OFF')
close_vg13()

View File

@@ -0,0 +1,2 @@
#otf2(start=703, end=715, time=0.2, delay=5, mode='LINEAR', alpha = 0.0, offset=-1.2, name='test')
otf2(start=450, end=475, time=3.0, delay=5, mode='CIRC -', alpha = 0.0, offset=-1.2, name='test')

View File

@@ -0,0 +1,22 @@
v_start= -20
v_end = 0
step_size=5
n=(v_start - v_end)/step_size
for i in range (int(abs(n))+1):
if v_start > v_end:
v=v_start - i*step_size
#print "reverse"
print ("Apply", v," volts")
caput('X11MA-KEI11:SETVOLTAGE',v)
sleep(0.1)
else:
v= i*step_size+v_start
print "forward"
print ("Apply", v," volts")
caput('X11MA-KEI11:SETVOLTAGE',v)
sleep(0.1)
sleep(20)

View File

@@ -0,0 +1,119 @@
#Parameters
sample_name='M4_120'
'''
FILENAME='Hyst_'+ sample_name + '_E2_Cm'
B1 = 1.0 # starting mag. field in Amps
B2 = -1.0 # final mag. field in Amps
BSTEP = 0.5 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 # time in 100ms
'''
# List of scans. Each scan is defined as: (start,stop, step)
# to make a whole loop two scans are needed: [(B1, B2, BSTEP),(B2,B1,-BSTEP)]
# to make half of a loop one scan is needed: [(B1, B2, BSTEP),] <- don't forget to put comma before ]
RANGES = [(B1, B2, -BSTEP),(B2,B1,BSTEP)]
set_exec_pars(open=False, tag=FILENAME)
#open_vg13()
#Pre-actions
# Here polarization and offsets are set
caput ("X11PHS-E:OPT","PGM+ID2")
print "ID mode set to PGM+ID2"
#caput(OTF_OFF1,-50) #detune ID1
caput('X11MA-ID2:ENERGY-OFFS', OFFSET2)
print "ID offset set to ", OFFSET2
cawait('X11MA-ID2:DONE',1)
print "Offset setting done"
if MODE is 1 or 2:
caput('X11MA-ID2:MODE',MODE)
#print "Polarization mode set"
else:
raise Exception("Invalid polarization type: " + MODE)
cawait('X11MA-ID2:DONE',1)
print "ID mode setting done"
# setting number of samples to be averaged, which depends on the accumulation time
avg = ACC_TIME * 10
caput("X11MA-ES1-10ADC:AVG",avg)
# Generating a list of mag. fields (setpoints) needed for the loop
setpoints = []
for r in RANGES:
setpoints = setpoints + frange(r[0], r[1], r[2], True)
# plot properties
set_preference(Preference.ENABLED_PLOTS, ['field', 'tey_norm'])
set_preference(Preference.PLOT_TYPES, {'tey_norm':1})
#scan = ManualScan(['field', 'Energy'], ['TEY', 'I0', 'polarization', 'temperature', 'RingCurrent', 'tey_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan = ManualScan(['field', 'Energy'], ['I0', 'TEY', 'TFY', 'polarization', 'temperature', 'RingCurrent', 'tey_norm','tfy_norm'] , [min(setpoints), min(ENERGIES)], [max(setpoints), max(ENERGIES)], [len(setpoints)-1, len(ENERGIES)-1])
scan.start()
# Main loop
for B in setpoints:
print "Setting field = ", B
caput("X11MA-XMCD:I-SETraw",B)
time.sleep( FIELD_CHANGE_SLEEP ) # Settling time
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
while abs(readback1-B) > FIELD_PRECISION:
#readback1 = caget("X11MA-XMCD:Ireadout")
readback1 = field.read()
time.sleep(0.1)
for E in ENERGIES:
print "Setting energy = ", E
#caput('X11PHS-E:GO.A', E)
energy.write(E)
time.sleep (0.1)
print "Energy set"
cawait('X11PHS:alldone', 1)
print "done"
readback2 = energy.read()
if abs(readback2 - E) > 0.1 : # TODO: Check accuracy
raise Exception('Energy could not be set to the value ' + str(E))
sleep( ENERGY_CHANGE_SLEEP ) # Settling time
detector1 = keithley_1a.read() #Keithley1
detector2 = keithley_2a.read() #Keithley2
detector3 = keithley_3a.read() #Keithley3
detector4 = caget('X11MA-ID2:MODE') #polarization in ID2
#detector5 = caget("X11MA-ID2:ALPHA-READ") # polAngle in ID2
detector6 = caget('X11MA-ES3-LSCI:TEMP_RBV') #temperature.get()
detector7 = caget("ARIDI-PCT:CURRENT")
#detector8 = signal_field_analog_x.read() # fieldAnalogX.get()
tey_norm = detector2/detector1
tfy_norm = detector3/detector1
#converting polarization strings to integer numbers: C+ -> 1 and C- -> 2
if detector4 == 'CIRC +': detector4 = 1
elif detector4 == 'CIRC -': detector4 = 2
else: detector4 = 0
#print "step 7"
#scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector4, detector6, detector7, tey_norm])
scan.append ([B, E], [readback1, readback2], [detector1, detector2, detector3, detector4, detector6, detector7, tey_norm, tfy_norm])
scan.end()
caput("X11MA-ES1-10ADC:AVG",1)
#close_vg13()

View File

@@ -0,0 +1,48 @@
open_vg13()
sample_name='M4_120'
#HYST
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
FILENAME='Hyst_'+ sample_name + '_Cm'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME='Hyst_'+ sample_name + '_Cp'
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
close_vg13()

View File

@@ -0,0 +1,238 @@
time.sleep(1)
open_vg13()
open_vg13()
'''
#Sample M1
TRY.write(-1.5)
TRZ.write(14)
time.sleep(30)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.04 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.03 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.04 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.03 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M2
TRY.write(-0.9)
TRZ.write(22.5)
time.sleep(30)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.04 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.03 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="M2_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.04 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.03 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M3
TRY.write(-0.9)
TRZ.write(30)
time.sleep(30)
FILENAME="M3"
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 8)
for i in range(1):
FILENAME="M3_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="M3_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
'''
#Sample M4
TRY.write(1.0)
TRZ.write(18)
time.sleep(30)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
FILENAME="M4_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="M4_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M5
TRY.write(2.0)
TRZ.write(24.5)
time.sleep(30)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
FILENAME="M5_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="M5_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
#Sample M6
TRY.write(2.0)
TRZ.write(30)
time.sleep(30)
caput('X11MA-KEI10:RANGE', 7)
caput('X11MA-KEI11:RANGE', 7)
caput('X11MA-KEI12:RANGE', 9)
for i in range(1):
FILENAME="M6_Cm"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 2 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
FILENAME="M6_Cp"
B1 = 2.0 # starting mag. field in Amps
B2 = -2.0 # final mag. field in Amps
BSTEP = 0.05 # step size mag. field in Amps. in Amps (1mT ~0.25A)
ENERGIES = (700,707.4) #list of energies in eV
MODE = 1 #polarization (CIRC+ -> 1 or CIRC- -> 2)
OFFSET2 = -1.2 #ID2 offset
FIELD_PRECISION = 0.04 #
ENERGY_CHANGE_SLEEP = 0.5 # put the Enerrgy settling time if needed
FIELD_CHANGE_SLEEP = 0.5 # put the Field settling time if needed
ACC_TIME = 0.1 #I think this number x 10 is in seconds
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/field_sweepID2.py')
close_vg13()

View File

@@ -0,0 +1,2 @@
#run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/2021_june_Energy.py')#there was a timeout in the second script, but this one was complete, so I re start from the second one
run('/sls/X11MA/data/X11MA/pshell/home/script/Users/Cinthia/hyst_ID2_Fe_all_samples.py')

View File

@@ -0,0 +1,3 @@
#energy.write(710)
#time.sleep (2)
cawait('X11PHS:alldone', 0, timeout=5)

View File

@@ -0,0 +1,74 @@
#Constants
AVERAGE = 10
EXPOSURE = 5
MEASUREMENTS = 40
#TwoImages Two Pol with C+/C- and ID1 + ID2, tune-detune, at 710 eV
set_beamline_setup(id ="ID1_ID2", en=706.7, pol1="Circ_Plus", alp1=0.0, har1=1, off1=0.0, pol2="Circ_Minus", alp2=0.0, har2=1, off2=0.0)
two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoEnergies with lin hor polarization ID2 only (normal)
set_beamline_setup(id ="ID2", en=706.7, pol1="Lin_Hor")
two_energies(706.7, 703, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#TwoEnergies with lin hor polarization ID2 only (normal)
set_beamline_setup(id ="ID2", en=464.2, pol1="Lin_Hor")
two_energies(462.6, 458.2, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
time.sleep(2.0)
#Constants
AVERAGE2 = 4
EXPOSURE2 = 4.0
change_energy(703)
abs_spec(ranges="Fe_L32__Arik_Beck_fine", roi="saraROI", switch_pol=False, scans=1, exposure=EXPOSURE2, average=AVERAGE2)
#Constants
AVERAGE3 = 1
EXPOSURE3 = 4.0
change_energy(450)
abs_spec(ranges="Ti_Sara", roi="saraROI", switch_pol=False, scans=1, exposure=EXPOSURE3, average=AVERAGE3)
change_energy(523)
abs_spec(ranges="O_Sara", roi="saraROI", switch_pol=False, scans=1, exposure=EXPOSURE3, average=AVERAGE3)
#TakeImage at 710 eV at the given polarization
#change_energy(710)
#take_image(scans=1, switch_pol=False, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
#time.sleep(2.0)
#TwoImages Two Pol with C+/C- and ID1 + ID2, tune-detune, at 710 eV
#set_beamline_setup(id ="ID1_ID2", en=710, pol1="Circ_Plus", alp1=0.0, har1=1, off1=0.0, pol2="Circ_Minus", alp2=0.0, har2=1, off2=0.0)
#two_pol(switching="Tune_Detune", sequence="A", measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
#time.sleep(2.0)
#TwoEnergies with lin hor polarization ID2 only (normal)
#set_beamline_setup(id ="ID2", en=710, pol1="Lin_Hor")
#two_energies(705, 710, measurements=MEASUREMENTS, exposure=EXPOSURE, average=AVERAGE)
#time.sleep(2.0)
#abs_spec(ranges=[[500.0, 1000.0, 100.0],], switch_pol=False, scans=1, exposure=EXPOSURE, average=AVERAGE) #Use manulally defined ranges and rois defined in GUI
#Direct functions to change energy, pol, offset:
#change_energy(700)
#change_pol(1, "Circ_Plus" ) #Pol on ID1: "Circ_Plus", "Circ_Minus" , "Lin_Hor", "Lin_Ver"
#change_pol(1, "Lin" , alpha = "0" ) #Lin pol on ID 1
#change_offset(1, 0.0) #offset on ID1
#Auto-switching:
#switch_pol()
#Restoring beamline state defined in last set_beamline_setut:
#restore_beamline_setup()

View File

@@ -0,0 +1,11 @@
set_exec_pars(open=False)
print('la')
run("templates/Eiger2Img", { \
"METHOD": "Take_Image", "AUTO_SAVE": True, \
"MEASUREMENTS": 1, "EXPOSURE": 1, "AVERAGE": 1, \
"SWITCHING": None, "SEQUENCE": None, \
"ENERGY_1":None, "ENERGY_2":None, \
"NUMBER_SCANS":1, "SWITCH_POL": False, \
})

Some files were not shown because too many files have changed in this diff Show More