fp_realign
- Realign detector offsets¶
This script is for realigning a detector offset file, iterating against planetMaps.
An example configuration file is here:
fp_realign.cfg
.
See the docstring for main()
, below, for the invocation patterns.
Reference¶
-
moby2.analysis.fp_fit.realign.
main
(args_in)[source]¶ How to use this code – set up the required inputs, i.e.:
map_cfg_tplate: filename for a mapping input file. The “output” and “pointing” blocks will be overwritten! Best to comment them out entirely.
base_model: a pointing configuration block to use for the “pointing_shifts” part of the pointing configuration.
input_template: the detector offsets file to use as the base – this code will generate new offsets based on this one.
Write the start-point offsets. (If you know your planet map has the signal at position (x,y), then set the offset to (-x, -y)):
# set shifts for stage 0 to (0,0) moby2 fp_realign set-shifts 0 0 0
Do a trial map (stage 0):
moby2 fp_realign map 0 --trial
Measure peak position in stage 0 maps:
moby2 fp_realign measure 0
If you are satisfied with that, then great. If not, update the (local) shifts database so as to eliminate the offset:
moby2 fp_realign measure 0 --set-next-shift --target 0 0
You can use –target to say where you want the planet to be in the map… sometimes 0,0 makes sense but sometimes you might want it to appear at the same position as it used to / as it does in other arrays.
After “set-next-shift”, you can run maps for the next stage to verify it worked:
moby2 fp_realign map 1 --trial moby2 fp_realign measure 1
If satisfied, redo everything without –trial. To clear the local shifts database, run:
moby2 fp_realign reset-shifts 0
When happy with the maps, write the final shifted template:
moby2 fp_realign write_template 1 template_out.txt