-
Notifications
You must be signed in to change notification settings - Fork 8
Reflectometry
John Holt edited this page Nov 29, 2019
·
2 revisions
Some function require a sample with many parameters. Usually you would use a sample generator to set defaults for a samples and them get a specific sample with set values. For example:
sample_generator = SampleGenerator(
translation=100,
height2_offset=0,
phi_offset=0,
psi_offset=0,
height_offset=1.0,
resolution=0.03,
footprint=60)
# Create sample
sample = sample_generator.new_sample(
title="S1 dDPPCS",
height_offset=-0.005,
phi_offset=0.400-0.299, # aligned phi - aligned theta
psi_offset=-0.06,
translation=100.0)
SampleGenerator(translation, height2_offset, phi_offset, psi_offset, height_offset, resolution, footprint, title='', subtitle='')
Args:
translation: The translation for the sample
height2_offset: Height of the second stage with no mirror relative to the beam for this sample
phi_offset: offset from 0 for the sample in the phi direction (along the beam)
psi_offset: offset from 0 for the sample in the psi direction (perpendicular to the beam)
resolution: resolution for this sample
footprint: footprint of beam on sample
title: main title for the sample; defaults to blank
subtitle: subtitle for the sample; defaults to blank
To get a sample use:
new_sample(title=None, subtitle=None, translation=None, height2_offset=None, phi_offset=None, psi_offset=None, height_offset=None, resolution=None, footprint=None) unbound technique.reflectometry.sample.SampleGenerator method
Create a new sample with given values; if no value defined use defaults
Args:
translation: The translation for the sample
height2_offset: Height of the second stage with no mirror relative to the beam for this sample
phi_offset: offset from 0 for the sample in the phi direction (along the beam)
psi_offset: offset from 0 for the sample in the psi direction (perpendicular to the beam)
height_offset: Offset for height of main stage
resolution: resolution for this sample
footprint: footprint of beam on sample
title: main title for the sample; defaults to blank
subtitle: subtitle for the sample; defaults to blank
If you want a one of sample use:
Sample(title, subtitle, translation, height2_offset, phi_offset, psi_offset, height, resolution, footprint)
Initialiser.
Args:
translation: The translation for the sample
height2_offset: Height of the second stage with no mirror relative to the beam for this sample
phi_offset: offset from 0 for the sample in the phi direction (along the beam)
psi_offset: offset from 0 for the sample in the psi direction (perpendicular to the beam)
resolution: resolution for this sample
footprint: footprint of beam on sample
title: main title for the sample; defaults to blank
subtitle: subtitle for the sample; defaults to blank
Check the slit values.
slit_check(theta, footprint, resolution)
Check the slits values
Args:
theta: theta
footprint: desired footprint
resolution: desired resolution
Set reflectometer at a given angle and make a measurement. Specifically move to a given theta and super mirror angle with slits set. If a current, time or frame count are given then take a measurement.
run_angle(sample, angle, count_uamps=None, count_seconds=None, count_frames=None, s1vg=None, s2vg=None, s3vg=None, s4vg=None, smangle=None, mode=None, auto_height=False, dry_run=False)
Move to a given theta and smangle with slits set. If a current, time or frame count are given then take a
measurement.
Args:
sample (techniques.reflectometry.sample.Sample): The sample to measure
angle: The angle to measure at, theta and in liquid mode also the sm angle
count_uamps: the current to run the measurement for; None for use count_seconds
count_seconds: the time to run the measurement for if uamps not set; None for use count_frames
count_frames: the number of frames to wait for; None for don't count
s1vg: slit 1 vertical gap; None to use sample footprint and resolution
s2vg: slit 2 vertical gap; None to use sample footprint and resolution
s3vg: slit 3 vertical gap; None use fraction of maximum based on theta
s4vg: slit 4 vertical gap; None use fraction of maximum based on theta
smangle: the super mirror angle if set sm get put in the beam; None don't move the super mirror
mode: mode to run in; None don't change modes (means super mirror is not moved in or out for instance)
auto_height: if True when taking data run the auto-height routine
dry_run: True just print what is going to happen; False do the experiment
Perform a transmission experiment.
transmission(sample, title, s1vg, s2vg, count_seconds=None, count_uamps=None, count_frames=None, s1hg=None, s2hg=None, s3hg=None, s4hg=None, height_offset=None, smangle=None, mode=None, dry_run=False)
Perform a transmission
Args:
sample (techniques.reflectometry.sample.Sample): The sample to measure
title: Title to set
count_seconds: time to count for in seconds
count_uamps: number of micro amps to count for
count_frames: number of frames to count for
s1vg: slit 1 vertical gap
s2vg: slit 2 vertical gap
s1hg: slit 1 horizontal gap; None to leave unchanged
s2hg: slit 2 horizontal gap; None to leave unchanged
s3hg: slit 3 horizontal gap; None to leave unchanged
s4hg: slit 4 horizontal gap; None to leave unchanged
height_offset: Height offset from normal to set the sample to
smangle: super mirror angle; None for don't use a super mirror
mode: mode to run in; None don't change mode
dry_run: True to print what happens; False to do experiment