fixes in flomni doc and completion of first version of omny doc
This commit is contained in:
@@ -102,7 +102,7 @@ The nano-positioning is controlled by a feedback loop running on a real-time lin
|
||||
|
||||
Once the loop has started, it is possible to start bec with the flOMNI configuration file.
|
||||
|
||||
Loading the flOMNI configuration
|
||||
Loading the flOMNI configuration (this command will load the OMNY configuration only - isolated from the beamline)
|
||||
`bec.config.update_session_with_file("/bec/csaxs_bec/csaxs_bec/device_configs/flomni_config.yaml")`
|
||||
|
||||
Loading the flOMNI scripts
|
||||
@@ -235,17 +235,17 @@ The alginment obtained by the X-ray eye can be refinde by recording ptychography
|
||||
Next, run the alignment scan by
|
||||
`flomni.tomo_alignment_scan()`
|
||||
|
||||
Reconstruct the scand and use SPEC_ptycho_align.m to obtain improved fit parameters. The new parameters can be loaded by
|
||||
Reconstruct the scan and use SPEC_ptycho_align.m to obtain improved fit parameters. The new parameters can be loaded by
|
||||
`flomni.read_alignment_offset()`
|
||||
|
||||
For a __very__ tight vertical field of view, a fine vertical alignment based on outputs generated from early tomography reconstructions can be used. A corresponding file can be generated by the tomography reconstruction script and can be loaded by the following two methods:
|
||||
`read_additional_correction_y()`
|
||||
`read_additional_correction_y2()`
|
||||
`flomni.read_additional_correction_y()`
|
||||
`flomni.read_additional_correction_y2()`
|
||||
One __important__ note: The first method is by default loading a mirror correction file automatically. If the tomogram is using that data, do not overwrite it, use the secondary correction instead.
|
||||
|
||||
The scan offsets are computed at each projection by
|
||||
`compute_additional_correction_y(angle)`
|
||||
`compute_additional_correction_y2(angle)`
|
||||
`flomni.compute_additional_correction_y(angle)`
|
||||
`flomni.compute_additional_correction_y2(angle)`
|
||||
|
||||
The additional correct can be __reset__ by
|
||||
`flomni.reset_correction()`
|
||||
@@ -256,9 +256,9 @@ It will automatically load the default mirror correction file as primary correct
|
||||
|
||||
At any stage of the alignment process it is possible to scan a projection.
|
||||
|
||||
Define the scan parameters by running `flomni.tomo_parameters()`
|
||||
Define the scan parameters by `flomni.tomo_parameters()`
|
||||
|
||||
Run a scan at _angle_ (in degrees) by running `flomni.tomo_scan_projection(angle)`
|
||||
Run a scan at _angle_ (in degrees) by `flomni.tomo_scan_projection(angle)`
|
||||
|
||||
### Tomography
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ OMNY is a microscope setup for 3D mesurements via ptychographic X-ray computed t
|
||||
|
||||
### Change to a new sample
|
||||
|
||||
The sample storage, shuttles and parking positions are described in detail (here)[user.ptychography.omny.samples].
|
||||
|
||||
1. `omny.otransfer_get_sample(0)` remove current sample from sample stage. Watch gripper action and be ready to ctrl+c in case something is wrong.
|
||||
_If in doubt check that the correct sample shutte is in the active position by calling `omny.otransfer_storage()`. The slot can be selected by `omny.otransfer_park_slot(slot)`._
|
||||
1. `omny.otransfer_put_sample(position)` put the sample to the selected shuttle
|
||||
@@ -57,311 +59,298 @@ Then, `umv(dev.ootransy,-1.5)` followed by
|
||||
|
||||
If this error happens after a sample was mounted or unmounted, it is important to chech that the sample storage is correct `omny.otransfer_storage()`.
|
||||
|
||||
(user.ptychography.omny.samples)=
|
||||
### Sample storage and transfer
|
||||
|
||||
Following commands will provide help within BEC:
|
||||
- `omny.otransfer_help()` print help related to sample transfer
|
||||
- `dev.omny_samples.help()` print help related to sample storage
|
||||
|
||||
#### Managing sample storage
|
||||
|
||||
#### Sample transfer
|
||||
|
||||
|
||||
## How to setup OMNY (software)
|
||||
|
||||
This part of the manual describes the software structure in more detail.
|
||||
|
||||
### how to start the realtime feedback loop and bec with flOMNI
|
||||
|
||||
Start the bec server and client as documented elsewhere
|
||||
|
||||
Loading the configuration, if not done by default
|
||||
|
||||
bec.config.update_session_with_file("/bec/csaxs_bec/csaxs_bec/device_configs/omny_config.yaml")
|
||||
|
||||
Loading the OMNY scripts
|
||||
|
||||
from csaxs_bec.bec_ipython_client.plugins.omny import OMNY
|
||||
Omny = OMNY(bec)
|
||||
|
||||
Initialization of the stages
|
||||
To see the status of the stages following commands are available:
|
||||
|
||||
Show the status of all galil controllers (all stepper motor and rotation stage)
|
||||
dev.osamx.controller.galil_show_all()
|
||||
|
||||
For the smaract stages (shield and CS stages)
|
||||
dev.oshield.controller.show_all()
|
||||
|
||||
|
||||
To reference the stages of OMNY:
|
||||
omny.omny_init_stages(autoconfirm, autoretry)
|
||||
|
||||
The process will regularly prompt the user for OK. At safe states this can be automatically done by autoconfirm=1
|
||||
In case referencing fails, another attempt will be made after prompting the user. This can also be automatically done for certain number of times using the parameter autoretry
|
||||
We typically use
|
||||
omny.omny_init_stages(autoconfirm=1, autoretry=2)
|
||||
The sample holders used are [OMNY pins](https://www.dora.lib4ri.ch/psi/islandora/object/psi:4528). These are instsalled in sample transfer shuttles, which can load up to six pins. These shuttles are transferred via a vacuum load lock to the vacuum chamber. The loading procedure can be handled at room temperature or under cryogenic conditions.
|
||||
The thee __shuttles__ that exist are named __“A”, “B”, “C”__. The __pin positions__ within a shuttle are number __1 to 6__ according to the following sketch:
|
||||
|
||||
```{figure} omny_shuttle.png
|
||||
OMNY sample shuttle
|
||||
```
|
||||
|
||||
In addition to the shuttle positions, there are __fixed positions in OMNY__ which have numbers __larger than 10__. Such fixed positions are treated as system __“O”__.
|
||||
|
||||
Each shuttle can be placed in a __parking slot__ in OMNY. The parking slots are numbered as displayed below (oparkz slot). Slots 1 and 2 are at room temperature. Slots 3 to 6 are at cryogenic temperature.
|
||||
|
||||
```{figure} omny_parking.png
|
||||
OMNY parking station
|
||||
```
|
||||
|
||||
The status of the sample storage has to be correct in BEC. This means that the status of OMNY pins within OMNY ("O") as well as the shuttles has to be correct, the pin status within the shuttles ("A", "B", "C"), as well as the status of the shuttles within the OMNY parking.
|
||||
This loading status is handled via a OMNY samples device: `dev.omny_samples`
|
||||
|
||||
Interferometer
|
||||
If the realtime system is restarted, bec will lose communication. To restart:
|
||||
Within the BEC client session `dev.omny_samples.help()` will display all required commands with a short explanation.
|
||||
|
||||
omny.rt_off() … then wait a few seconds
|
||||
omny.rt_on()
|
||||
To get an overview use `dev.omny_samples.show_all()` or `omny.otransfer_storage()`
|
||||
|
||||
To show the signal of the interferometers:
|
||||
Modify a slot position of systems "A", "B", "C", "O":
|
||||
`dev.omny_samples.unset_sample_slot('system',position)` free a sample position.
|
||||
`dev.omny_samples.set_sample_slot('system',position,'name')` set a sample position. The sample has to get a _name_.
|
||||
|
||||
There are two __special sample slots__:
|
||||
If a sample is in the __gripper__ and the information has to be manually changed use
|
||||
`dev.omny_samples.unset_sample_in_gripper()`
|
||||
`dev.omny_samples.set_sample_in_gripper('name')`
|
||||
|
||||
In the case of the sample stage position, the commands are
|
||||
`dev.omny_samples.unset_sample_in_samplestage()`
|
||||
`dev.omny_samples.set_sample_in_samplestage('name')`
|
||||
|
||||
The shuttles are mounted in the parking station. Typically oparkz slot 3 is used for shuttle A, slot 4 for shuttle B, slot 5 for shuttle C. If that status has to be modified, the following commands can be used:
|
||||
`dev.omny_samples.unset_shuttle_slot(slot_nr)`
|
||||
`dev.omny_samples.set_shuttle_slot(container, slot_nr)`
|
||||
Here is an _example_: dev.omny_samples.set_shuttle_slot('A',2)
|
||||
|
||||
#### Sample transfer
|
||||
|
||||
Once the sample places are set correctly and checked by using `omny.otransfer_storage()`, the following commands are available for sample change. To pick a sample from a parking slot, the parking slot stage has to be moved to the correct parking slot position. If a parking position is active, this information is displayed in sample storage overview.
|
||||
|
||||
| Command | Explanation |
|
||||
| --- | --- |
|
||||
| `omny.otransfer_help()` | print a brief help |
|
||||
| `omny.otransfer_park_slot(slot)` | drive the __parking station__ to place for sample transfer from _<slot>_ |
|
||||
| `omny.otransfer_park_loadlock_slot(slot)` | drive the __parking station__ to load _<slot>_ with the loadlock |
|
||||
| `omny.otransfer_get_sample(position)` | pick with the gripper from _<position>_ |
|
||||
| `omny.otransfer_put_sample(position)` | put with the gripper to _<position>_ |
|
||||
|
||||
For transfer the __sample stage__ is refered to as _position_ 0.
|
||||
|
||||
Advanced commands ... in case something goes wrong
|
||||
| Command | Explanation |
|
||||
| --- | --- |
|
||||
| `omny._otransfer_gripper_up()` | move gripper up |
|
||||
| `omny._otransfer_gripper_to_park_z()` | move gripper up and to parking position |
|
||||
| `omny._otransfer_ensure_shuttle_closed()` | close shuttle of parking station |
|
||||
| `omny._oshield_ST_close()` | close shield of sample stage |
|
||||
|
||||
When closing a shuttle of the shield, the gripper will be moved to the parking position prior closing.
|
||||
|
||||
## How to setup OMNY (software)
|
||||
|
||||
This part of the manual describes the software structure in more detail.
|
||||
|
||||
### start the realtime feedback loop and BEC with OMNY
|
||||
|
||||
The nano-positioning is controlled by a feedback loop running on a real-time linux based computer. With all related hardware connected, this loop has to be started manually.
|
||||
|
||||
1. Login to the computer by `ssh control@mpc3217`. The password is "engine".
|
||||
1. `cd OMNY/OMNY/`
|
||||
1. `./startOMNY`
|
||||
|
||||
Once the loop has started, it is possible to start bec with the OMNY configuration file.
|
||||
|
||||
Loading the OMNY configuration (this command will load the OMNY configuration only - isolated from the beamline)
|
||||
`bec.config.update_session_with_file("/bec/csaxs_bec/csaxs_bec/device_configs/flomni_config.yaml")`
|
||||
|
||||
Loading the OMNY scripts
|
||||
`from csaxs_bec.bec_ipython_client.plugins.omny import OMNY`
|
||||
`omny = OMNY(bec)`
|
||||
|
||||
If the realtime system is restarted, BEC will lose communication. To restart:
|
||||
`omny.rt_off()` … then wait a 10 seconds
|
||||
`omny.rt_on()`
|
||||
|
||||
### Initialization of the stages
|
||||
|
||||
The stages of OMNY are referenced in respect to their endswitches and reference marks. The stages have to be initialized at the beginning of a run or when the Galil motor controllers have been reset or restarted. To see the status of the stages following commands are available:
|
||||
|
||||
Show the status of all galil controllers (all stepper motor and rotation stage)
|
||||
`dev.osamx.controller.galil_show_all()`
|
||||
|
||||
For the smaract stages (shield and CS stages)
|
||||
`dev.oshield.controller.show_all()`
|
||||
|
||||
In case referencing of the OMNY stages is required, run
|
||||
`omny.omny_init_stages(autoconfirm, autoretry)`
|
||||
|
||||
The process will regularly prompt the user for OK. At safe states this can be automatically done by setting _autoconfirm=1_.
|
||||
In case referencing fails, another attempt will be made after prompting the user. This can also be automatically done for certain number of times using the parameter autoretry.
|
||||
We typically use
|
||||
`omny.omny_init_stages(autoconfirm=1, autoretry=2)`
|
||||
|
||||
### Interferometer
|
||||
|
||||
If the realtime system is restarted, BEC will lose communication. To restart:
|
||||
`omny.rt_off()` … then wait a 10 seconds
|
||||
`omny.rt_on()`
|
||||
|
||||
To show the signal of the interferometers:
|
||||
omny.show_signal_strength_interferometer()
|
||||
Typical values with proper alignment, sample stage at the measurement position and laser tracker running are
|
||||
_TODO_
|
||||
|
||||
Laser tracker commands
|
||||
omny.laser_tracker_show_all()
|
||||
omny.laser_tracker_on()
|
||||
omny.laser_tracker_off()
|
||||
#### Laser tracker commands
|
||||
|
||||
When the PSD signal of the tracker is very low, switching the laser tracker on will not be successful. One can use
|
||||
omny.omny_interferometer_tweak_otrack()
|
||||
to manually tweak the coarse stages of the tracker. Once signal is reached the tracker can be enabled. This should only be required during setup of OMNY.
|
||||
The horizontal interferometer is built according to the [tracking interferometer](https://www.dora.lib4ri.ch/psi/islandora/object/psi:7524). The tracker can be controlled by following commands. During commissioning of the setup it is worthy to check the status, but during general operation these commands should not be required.
|
||||
|
||||
Aligning the interferometer
|
||||
omny.interferometer_tweaking()
|
||||
Allows tweaking the interferometer
|
||||
channel selection by numbers 1 to 7
|
||||
arrows to tweak
|
||||
q to quit.
|
||||
Some mirrors are regularly automatically aligned, such as the horizontal mirror of the OSA. This can also be manually executed by omny.omny_interferometer_align_tracking()
|
||||
- `omny.laser_tracker_show_all()`
|
||||
- `omny.laser_tracker_on()`
|
||||
- `omny.laser_tracker_off()`
|
||||
|
||||
When the PSD signal of the tracker (PSD not signalstrength!) is too low, enabling the laser tracker will not be successful. One can use `omny.omny_interferometer_tweak_otrack()` to manually tweak the coarse stages of the tracker. Once signal is reached the tracker can be enabled. This should only be required during commissioning of OMNY.
|
||||
|
||||
Interferometer feedback commands
|
||||
#### Interferometer alignment
|
||||
|
||||
omny.feedback_enable_with_reset()
|
||||
There is also an enable without reset, which is used during tomography scans, when using coarse stages to increase the scan range. It should not be required to use manually.
|
||||
Several mirrors in OMNY are motorized. Aligning the interferometer can thus be done via software. To enter alignment mode use
|
||||
`omny.interferometer_tweaking()`.
|
||||
Select the channel by using number keys __1 to 7__ and the __arrow keys__ to tweak.
|
||||
The tweaking mode can be exited by pressing __q to quit__.
|
||||
Some mirrors are regularly automatically aligned, such as the horizontal mirror of the OSA. This automatic alignment can also be manually executed by `omny.omny_interferometer_align_tracking()`.
|
||||
|
||||
omny.feedback_disable()
|
||||
omny.feedback_status()
|
||||
#### Interferometer feedback commands
|
||||
|
||||
The closed loop control of the Piezo stages can be controlled by
|
||||
- `omny.feedback_enable_with_reset()`.
|
||||
_There is also an enable without reset, which is used during tomography scans, when using coarse stages to increase the scan range. It should not be required to use manually._
|
||||
- `omny.feedback_disable()`
|
||||
- `omny.feedback_status()`
|
||||
|
||||
Sample storage and transfer
|
||||
omny.otransfer_help() print help related to sample transfer
|
||||
dev.omny_samples.help() print help related to sample storage
|
||||
|
||||
OMNY uses sample transfer shuttles, which can load up to six sample pins. These shuttles are transferred via a vacuum load lock to the vacuum chamber. The shuttles are named “A”, “B”, “C”
|
||||
In addition, there are fixed positions available in OMNY which are numbered 10+. Such fixed positions are treated as system “O”
|
||||
### X-ray optics alignment, near-field and far-field ptychography
|
||||
|
||||
The positions of the optics stages are stored as stage parameters and are thus linked to the configuration file.
|
||||
Example: The OSAx “in” position can be reviewed by `dev.oosax.user_parameter`
|
||||
Update the value by (example "oosax", "in") by `dev.oosax.update_user_parameter({"in":value})`
|
||||
|
||||
The pin positions within a shuttle are number 1 to 6 according to the following sketch:
|
||||
For __near-field__ and __far-field__ separate optics parameters are stored. Example:
|
||||
dev.oosax.user_parameter returns {'near_field_in': 3.2044, 'far_field_in': 3.022}
|
||||
Update the value by (example "oosax", "near_field_in")
|
||||
dev.oosax.update_user_parameter({"near_field_in":value})
|
||||
|
||||
The __global variable omny.near_field__ controls whether near- or far-field settings are used. To switch `omny.near-field=False` or `omny.near-field=True`.
|
||||
|
||||
`ofzp_info()` shows info about the available FZPs at the current energy of the beamline. Optional parameter energy in keV to get values at a different energy.
|
||||
Example: `omny.ofzp_info(6.2)`
|
||||
|
||||
__Laser feedback will be disabled and thus fine alignment lost if commands are used that move optics stages!__
|
||||
|
||||
Each shuttle can be placed in a parking slot in OMNY. The parking slots are numbered as displayed below (oparkz slot). Slots 1 and 2 are at room temperature. Slots 3 to 6 are at cryogenic temperature.
|
||||
Following functions exist to move the optics in and out, with self-explaining naming.
|
||||
- `optics_in()`
|
||||
- `ofzp_in()`
|
||||
- `ofzp_out()`
|
||||
- `oosa_in()`
|
||||
- `oosa_out()`
|
||||
- `oosa_move_out_of_shield()`
|
||||
|
||||
BEC has to be aware of sample mounted in the shuttles and also of the mounting status of each shuttle within the parking station. This is handled via a sample device: dev.omny_samples
|
||||
#### OMNY Fermat scan
|
||||
|
||||
The basic scan function can be called by `scans.omny_fermat_scan()` and offers a detailed doc string for further details (`scans.omny_fermat_scan?`). A prerequisite for scanning is a running feedback system. The scan has following parameters.
|
||||
|
||||
| Parameters | |
|
||||
| --- | --- |
|
||||
| fovx (float) | Fov in the piezo plane (i.e. piezo range). Max 200 um |
|
||||
| fovy (float) | Fov in the piezo plane (i.e. piezo range). Max 100 um |
|
||||
| cenx (float) | center position in x |
|
||||
| ceny (float) | center position in y |
|
||||
| exp_time (float) | exposure time |
|
||||
| step (float) | stepsize |
|
||||
| zshift (float) | shift in z |
|
||||
| angle (float) | rotation angle (will rotate first) |
|
||||
| corridor_size (float) | corridor size for the corridor optimization. Default 3 um |
|
||||
|
||||
Example:
|
||||
`scans.omny_fermat_scan(fovx=20, fovy=25, cenx=0.02, ceny=0, zshift=0, angle=0, step=0.5, exp_time=0.01)`
|
||||
|
||||
#### Overview of the alignment steps
|
||||
|
||||
There are several corrections applied to maintain the sample in the FOV:
|
||||
1. Mirror calibration
|
||||
1. X-ray eye alignment
|
||||
1. Ptychography fine alignment (improvement of the X-ray eye alignment step)
|
||||
1. Vertical shifts from tomography reconstruction (for very small vertical FOV)
|
||||
|
||||
#### XrayEye and sample alignment
|
||||
|
||||
Within a usual work-flow the movement of the X-ray eye is mostly moved automatically to the correct position. For manual movements use
|
||||
| Command | Explanation |
|
||||
| --- | --- |
|
||||
| omny.oeye_xray_in() | move to the fluorescense microscope in |
|
||||
| omny.oeye_cam_in() | move the camera showing the samplestage from downstream in |
|
||||
| omny.oeye_out() | move out, X-rays can reach the X-ray detector |
|
||||
|
||||
The _in_ and _out_ positions are stored as user parameters in the stage definition. Get the values by
|
||||
`dev.oeyex.user_parameter`
|
||||
`dev.oeyey.user_parameter`
|
||||
|
||||
Update the values by, example for oeyex and in position
|
||||
`dev.oeyex.update_user_parameter({"xray_in":value})`
|
||||
|
||||
To refresh the frame of the xray eye windows software
|
||||
`omny.xrayeye_update_frame()`
|
||||
|
||||
To start the xray eye alignment (and clear any previous alignment)
|
||||
`omny.xrayeye_alignment_start()`
|
||||
|
||||
To load the fit parameters from directory _dir_path_ computed by _SPEC_ptycho_align.m_ in Matlab run
|
||||
`omny.read_alignment_offset(dir_path='',setup="omny")`
|
||||
|
||||
dev.omny_samples.help()
|
||||
Help for OMNY sample storage:
|
||||
To get an overview use dev.omny_samples.show_all()
|
||||
or omny.otransfer_storage()
|
||||
Modify a slot:
|
||||
dev.omny_samples.unset_sample_slot('system',position)
|
||||
dev.omny_samples.set_sample_slot('system',position,'name')
|
||||
system can be A, B, C, O
|
||||
To load from a specific directory, specify it as parameter. Example:
|
||||
`omny.read_alignment_offset(dir_path="/bec/align",setup="omny")`
|
||||
|
||||
Special slots:
|
||||
dev.omny_samples.set_sample_in_gripper('name') /
|
||||
unset_sample_in_gripper()
|
||||
The loading routine uses default values for the vertical alignment for setup. This behavior can be changed (e.g. for getting new default values) by the parameter `use_vertical_default_values=False`.
|
||||
|
||||
dev.omny_samples.set_sample_in_samplestage('name') /
|
||||
unset_sample_in_samplestage()
|
||||
At each projection, the angular dependent is computed by
|
||||
`omny.get_alignment_offset(angle)`, with _angle_ in degrees.
|
||||
|
||||
Shuttle mounting within the parking station:
|
||||
dev.omny_samples.set_shuttle_slot(container, slot_nr) /
|
||||
unset_shuttle_slot(slot_nr)
|
||||
Example: dev.omny_samples.set_shuttle_slot('A',2)
|
||||
|
||||
The alignment can be cleared by
|
||||
`omny.reset_tomo_alignment_fit()`
|
||||
|
||||
Once the sample places are set correctly and checked (omny.otransfer_storage()) the following commands are available for sample change:
|
||||
#### Fine alignment
|
||||
|
||||
omny.otransfer_help()
|
||||
The alginment obtained by the X-ray eye can be refinde by recording ptychography projections at 45 deg. intervals. For this, adjust the tomo parameters by
|
||||
`omny.tomo_parameters()`
|
||||
|
||||
omny.otransfer_park_slot(slot)
|
||||
drive the parking station to transfer from <slot> with the gripper
|
||||
Next, run the alignment scan by
|
||||
`omny.tomo_alignment_scan()`
|
||||
|
||||
omny.otransfer_park_loadlock_slot(slot)
|
||||
drive the parking station to transfer from <slot> with the loadlock
|
||||
Reconstruct the scan and use SPEC_ptycho_align.m to obtain improved fit parameters. The new parameters can be loaded by
|
||||
`omny.read_alignment_offset()`
|
||||
|
||||
omny.otransfer_get_sample(position)
|
||||
pick with the gripper from <position>
|
||||
For a __very__ tight vertical field of view, a fine vertical alignment based on outputs generated from early tomography reconstructions can be used. A corresponding file can be generated by the tomography reconstruction script and can be loaded by the following two methods:
|
||||
`omny.read_additional_correction_y()`
|
||||
`omny.read_additional_correction_y2()`
|
||||
One __important__ note: The first method is by default loading a mirror correction file automatically. If the tomogram is using that data, do not overwrite it, use the secondary correction instead.
|
||||
|
||||
omny.otransfer_put_sample(position)
|
||||
put with the gripper to <position>
|
||||
The scan offsets are computed at each projection by
|
||||
`omny.compute_additional_correction_y(angle)`
|
||||
`omny.compute_additional_correction_y2(angle)`
|
||||
|
||||
The additional correct can be __reset__ by
|
||||
`omny.reset_correction()`
|
||||
It will automatically load the default mirror correction file as primary correction! To reset and not load any correction, which might be useful to obtain a new default correction file, run
|
||||
`omny.reset_correction(use_default_correction=False)`
|
||||
|
||||
Advanced commands in case something goes wrong (also use tab completion)
|
||||
omny._otransfer_gripper_up() move gripper up
|
||||
omny._otransfer_gripper_to_park_z() move gripper up and to parking position
|
||||
omny._otransfer_ensure_shuttle_closed() close shuttle of parking station
|
||||
omny._oshield_ST_close() close shield of sample stage
|
||||
#### Scanning of projections
|
||||
|
||||
At any stage of the alignment process it is possible to scan a projection.
|
||||
|
||||
Define the scan parameters by `omny.tomo_parameters()`
|
||||
|
||||
Optics alignment / near-field / far-field ptycho
|
||||
Run a scan at _angle_ (in degrees, 0 to 180) by `omny.tomo_scan_projection(angle)`
|
||||
|
||||
The positions of the optics stages are stored as parameters to the stages.
|
||||
Example: The OSAx “in” position can be seen by
|
||||
dev.oosax.user_parameter
|
||||
### Tomography
|
||||
|
||||
For near-field and far-field separate optics parameters are stored.
|
||||
dev.oosax.user_parameter
|
||||
Out[25]: {'near_field_in': 3.2044, 'far_field_in': 3.022}
|
||||
The tomo parameters have to be set by
|
||||
`omny.tomo_parameters()`
|
||||
|
||||
Once satisfied with the alignment, the tomography scan can be started by
|
||||
`omny.tomo_scan()`
|
||||
|
||||
Three modes for angular sampling are implemented and they have different optional parameters for the tomo_scan method:
|
||||
| tomography mode | parameters and defaults |
|
||||
| --- | --- |
|
||||
| 2 sub-tomograms | subtomo_start=1, start_angle=None |
|
||||
| Golden ratio tomography (sorted in bunches) | projection_number=None |
|
||||
| Equally spaced with golden starting angle | projection_number=None |
|
||||
|
||||
Update the value by (example "fosax", "in")
|
||||
dev.fosax.update_user_parameter({"in":value})
|
||||
|
||||
The global variable
|
||||
omny.near_field
|
||||
controls whether near- or far-field settings are used.
|
||||
To switch omny.near-field=False or omny.near-field=True
|
||||
|
||||
|
||||
ofzp_info()
|
||||
Shows info about the available FZPs at the current energy of the beamline.
|
||||
Optional parameter energy in keV to get values at a different energy.
|
||||
Example: omny.ofzp_info(6.2)
|
||||
|
||||
|
||||
Feedback will be disabled and fine alignment lost if commands are used that move optics stages!
|
||||
|
||||
Following functions exist to move the optics in and out, the naming is self-explaining.
|
||||
optics_in()
|
||||
ofzp_in()
|
||||
ofzp_out()
|
||||
oosa_in()
|
||||
oosa_out()
|
||||
oosa_move_out_of_shield()
|
||||
|
||||
|
||||
OMNY Fermat scan
|
||||
|
||||
The underlying scan function can be called as
|
||||
scans.omny_fermat_scan()
|
||||
|
||||
Use
|
||||
scans.omny_fermat_scan?
|
||||
|
||||
for detailed information. A prerequisite for scanning is a running feedback system.
|
||||
|
||||
Alignment overview
|
||||
|
||||
There are several corrections applied to get the sample to the FOV:
|
||||
Mirror calibration
|
||||
X-ray eye alignment
|
||||
Ptychography fine alignment (improvement of 2)
|
||||
Vertical shifts from tomography reconstruction (for small vertical FOV)
|
||||
|
||||
XrayEye and sample alignment
|
||||
The XrayEye can be moved in and out by
|
||||
omny.oeye_xray_in()
|
||||
omny.oeye_cam_in()
|
||||
omny.oeye_out()
|
||||
|
||||
The in and out positions are stored as user parameters in the stage. Get the values by
|
||||
dev.oeyex.user_parameter
|
||||
dev.oeyey.user_parameter
|
||||
|
||||
Update the values by example for oeyex and in position
|
||||
dev.oeyex.update_user_parameter({"xray_in":value})
|
||||
|
||||
To refresh the frame of the xray eye windows software
|
||||
omny.xrayeye_update_frame()
|
||||
|
||||
To start the xray eye alignment (and clear any previous alignment)
|
||||
omny.xrayeye_alignment_start()
|
||||
|
||||
To load the fit parameters computed by SPEC_ptycho_align.m run
|
||||
omny.read_alignment_offset()
|
||||
|
||||
To load from a specific directory, specify it as parameter. Example:
|
||||
omny.read_alignment_offset(dir_path="/bec/align",setup="omny")
|
||||
|
||||
The loading routine uses default values for the vertical alignment for setup. This behavior can be changed (e.g. for getting new default values) by the parameter use_vertical_default_values=False
|
||||
|
||||
The alignment offset is computed by
|
||||
omny.get_alignment_offset(angle)
|
||||
|
||||
The alignment can be cleared by
|
||||
omny.reset_tomo_alignment_fit()
|
||||
|
||||
Fine alignment
|
||||
Recording ptychography projections at 45 deg. intervals allow replacing the X-ray eye alignment by more accurate parameters.
|
||||
Adjust the tomo parameters by
|
||||
omny.tomo_parameters()
|
||||
|
||||
And run the alignment scan by
|
||||
omny.tomo_alignment_scan()
|
||||
|
||||
The updated fit from SPEC_ptycho_align can be loaded by
|
||||
omny.read_alignment_offset()
|
||||
|
||||
For very fine vertical alignment based on output of an initial tomography reconstruction (for very tight vertical field of view) alignment, the data file can be loaded by
|
||||
read_additional_correction_y(), careful a default mirror correction is loaded automatically, so likely do not use this function. One can load a second iteration instead:
|
||||
read_additional_correction_y2()
|
||||
|
||||
The scan offsets are computed by
|
||||
compute_additional_correction_y(angle)
|
||||
compute_additional_correction_y2(angle)
|
||||
|
||||
The additional correct can be reset by
|
||||
omny.reset_correction()
|
||||
It will load the default primary correction! To run without any correction run (which might be useful to obtain a new default correction file)
|
||||
omny.reset_correction(use_default_correction=False)
|
||||
|
||||
Scanning of projections
|
||||
At any stage it is possible to scan a projection by
|
||||
|
||||
Defining scan parameters by running
|
||||
omny.tomo_parameters()
|
||||
|
||||
A scan can be performed at projection <angle> by running
|
||||
omny.tomo_scan_projection(angle), angle ranging from 0 to 180
|
||||
|
||||
Tomography
|
||||
|
||||
The tomo parameters have to be set by
|
||||
omny.tomo_parameters()
|
||||
|
||||
The tomography can be started by
|
||||
omny.tomo_scan()
|
||||
|
||||
Three modes for angular sampling are implemented and they have different optional parameters. But option 1 is what is absolutely recommended, because the other options cause significant wear in the rotation stage of OMNY.
|
||||
2 sub-tomograms
|
||||
Parameters and their defaults: subtomo_start=1, start_angle=None
|
||||
Golden ratio tomography (sorted in bunches)
|
||||
Parameters and their defaults: projection_number=None
|
||||
Equally spaced with golden starting angle
|
||||
Parameters and their defaults: projection_number=None
|
||||
|
||||
The following parameters can be used to restart an interrupted acquisition.
|
||||
In case of eight equally spaced sub-tomograms, an individual sub tomogram can be scanned by
|
||||
omny.sub_tomo_scan(subtomo_number, start_angle).
|
||||
If the start angle is not specified, it will be computed depending on the subtomo_number, which is ranging from 1 to 2.
|
||||
|
||||
|
||||
The parameters can be used to __restart an interrupted acquisition__.
|
||||
In case of eight equally spaced sub-tomograms, an individual sub tomogram can be scanned by flomni.sub_tomo_scan(subtomo_number, start_angle). If the start angle is not specified, it will be computed depending on the subtomo_number, which is ranging from 1 to 2.
|
||||
|
||||
__Mechanical wear is an issue with lifetime of dry vacuum stages. Thus for standard acquisitions that do not have VERY strong arguments that require a different mode, two sub-tomograms has to be performed.__
|
||||
|
||||
Reference in New Issue
Block a user