API: chopcal¶
The top-level package: instrument settings, and the bandwidths that go with them.
chopcal
¶
Functions:
-
bifrost–Chopper settings for BIFROST, from the slow edge of the band you want.
Attributes:
bifrost
¶
bifrost(energy_min=None, wavelength_max=None, shaping_time=0.0002, apertures=True, pulse_shaping_speed_max=PULSE_SHAPING_SPEED_MAX)
Chopper settings for BIFROST, from the slow edge of the band you want.
BIFROST passes a fixed bandwidth of about 1.91 angstrom, so one number decides where that band sits. Give it as either the longest wavelength or, equivalently, the lowest energy you want to reach the sample; the band runs from there to about 1.77 angstrom shorter::
wavelength_max=3.0 -> 1.15 to 3.05 angstrom ( 8.8 to 62.4 meV)
energy_min=7.0 -> 1.56 to 3.47 angstrom ( 6.8 to 33.5 meV)
Note the sense of it: the number you give is the slow end of the band. Asking for
energy_min=7 does not cap the incident energy at 7 meV -- it puts 7 meV at the
bottom and lets everything faster through, up to about 31 meV.
Parameters:
-
energy_min(float, default:None) –The lowest incident energy to pass, in meV.
-
wavelength_max(float, default:None) –The longest incident wavelength to pass, in angstrom. Overrides
energy_min. -
shaping_time(float, default:0.0002) –How long the pulse shaping pair should burst for, in seconds. They co-rotate at a harmonic of 14 Hz, one lagging the other, so the burst is one slit crossing less the lag; asking for longer than a crossing at
pulse_shaping_speed_maxdrops them to a lower harmonic and says so. Defaults to 0.2 ms. -
apertures(bool, default:True) –Whether to describe the beam at its real width, which widens every window in time and the band by about 0.13 angstrom. True by default. Pass False for the pencil beam every release before the disk geometry was known described, and the narrower numbers that went with it.
-
pulse_shaping_speed_max(float, default:PULSE_SHAPING_SPEED_MAX) –The fastest the installed pulse shaping disks may turn, in Hz. They turn at the highest harmonic of 14 Hz up to this that
shaping_timeallows. Defaults to the 196 Hz BIFROST was designed for; a substitute disk set rated lower needs its own limit, e.g. 126.
Returns:
-
ChopperSet–The six choppers by name, in beam order --
ps1andps2shaping the pulse,fo1andfo2suppressing frame overlap,bw1andbw2cutting the band -- each a :class:~chopcal.lib.Chopperofspeed,delay,beam,edges,pathandaperture. Feed.values()to :func:chopcal.lib.wavelength_limitsto see what the train actually passes.Every one is a single opening centred on the beam, so
beamis 0 andedgesis[-width/2, +width/2]-- what theanglefield of chopper-lib 2.x meant, said in the terms 4.x uses.apertureis 0, the point beam that field also described; chopcal holds no disk geometry to compute a real one from.
Examples:
>>> settings = bifrost(wavelength_max=3.0)
>>> settings
name speed [Hz] delay [ms] beam [deg] opening [deg] open [ms] aperture [deg] path [m]
ps1 196 3.8781 0 170 2.409 5.651 6.342
ps2 196 6.0874 0 170 2.409 5.651 6.362
fo1 14 6.13997 0 38.26 7.591 5.651 8.53
fo2 14 9.54764 0 52.01 10.32 5.651 14.973
bw1 14 42.8823 0 161 31.94 13.38 78
bw2 -14 42.8823 0 161 31.94 13.38 78.02
>>> settings['bw1'].delay
0.04288227...
>>> settings['bw1'].edges
[-80.5, 80.5]