The figure
shows that for a given phase cycle,
MRTCAL computes the average MJD of each of the 4 phases, and then the
average of the ONs and the average of the OFFs, and uses the ON average
MJD to associate the proper antenna position. The following list describes
the main steps of the algorithm, which is currently implemented in the
subroutine mrtcal_solve_pointing_bsw.
Figure:
Representation of the time distribution of the first phase dumps for
iram30m-nbc-20220301s205-imb.fits (subscan 1). The horizontal segments
labeled from 1 to 4 represent the integration time of each phase.
|
|
- Major loop on all the subscans:
- Sub-loop on all dump cycles in a subscan:
- Fetching the next cycle: subroutine
mrtcal_get_next_dumpcycle calls subroutines mrtcal_find_next_dumpcycle and mrtcal_read_next_dumpcycle. A cycle consists typically in the
dump sequence 1=ON, 2=OFF, 3=ON, 4=OFF.
- mrtcal_read_next_dumpcycle calls a cascade down to
mrtcal_read_subscan_data
- This also also includes chunkset mapping: as for the other
observing modes, one dump from the IMBF-backendCONT table is
mapped as a single chunk (chunk_t). Since continuum backends
are used, it provides only 1 intensity value (1 channel). This chunk
is attributed one MJD at the center of the dump integration time,
and from this MJD the chunk position is interpolated from the
antslow table (chunk%offset(1) and chunk%offset(2)).
See subroutine mrtcal_chunksets_from_data_1time1pix_1chunk.
- After the reading, the subroutine
mrtcal_get_next_dumpcycle, averages the ONs
(
) and OFFs (
) in the subroutine average_phases. It
uses mrtcal_chunkset_2d_accumulate_init and mrtcal_chunkset_2d_accumulate_do, ultimately calling mrtcal_chunkset_accumulate_do for weighted average of MJD
and weighted average of offsets (weight is integration time of
each phase). In return,
has average MJD and
offsets. Same for
.
- Computing
: i) call
mrtcal_on_minus_off for one dump cycle in mode isotfmap, ii) subroutine mrtcal_on_minus_off_head
keeps the
MJD and offsets.
- Loop on chunksets to create one drift per chunkset (subroutine
mrtcal_pointing_create). Each chunkset is a collection of
chunks computed at the previous steps, i.e. a collection of
with proper MJD and
offsets. Gather them as a continuum drift with irregular X axis in a
CLASS type(observation) in subroutine mrtcal_chunkset_to_obs_con. The operation is repeated for all
chunksets i.e. all subscans and all backend parts (H and V, etc)
(backsci%drift%indiv).
- Classify the drifts (subroutine mrtcal_pointing_classify) as desired (MSET SOLVE POINTING):
if there is more than 1 drift per class, resample the irregular X
axis to regular and average the drifts (subroutine mrtcal_solve_pointing_gather_regular) also in a type(observation) (backsci%drift%solved).
- For each class (subroutine mrtcal_solve_and_write_obslist):
- Solve each class with a gaussian+baseline model (subroutine
mrtcal_solve_pointing_observation) calling TELCAL solve_pointing. Convert TELCAL solution to CLASS pointing
section (subroutine mrtcal_fit_to_obs_poi).
- Remove the fitted baseline from each class RY arrays and
save the original RY as an associated array named POINTING (subroutine mrtcal_pointing_associate_array).
- Write to the output CLASS file (subroutine
mrtcal_obs_to_class).
- Save all the pointing results of the scan to the dedicated
MRTCAL section in the index (subroutine mrtcal_entry_sdrifts2poisec).
- Final feedback: i) ASCII table to screen or file (subroutine
mrtcal_solve_pointing_user_feedback), and ii) XML file
(subroutine pointing_to_VO).