The Observation class¶
The Observation class is used to handle the attributes and parameters of a measurement set.
- class rapthor.lib.observation.Observation(ms_filename, starttime=None, endtime=None)¶
The Observation object contains various MS-related parameters
- Parameters:
- ms_filenamestr
Filename of the MS file
- starttimefloat, optional
The start time of the observation (in MJD seconds). If None, the start time is the start of the MS file
- endtimefloat, optional
The end time of the observation (in MJD seconds). If None, the end time is the end of the MS file
- copy()¶
Returns a copy of the observation
- get_bandwidth_smearing_factor(freq, delta_freq, delta_theta, resolution)¶
Returns peak flux density reduction factor due to bandwidth smearing
- Parameters:
- freqfloat
Frequency at which averaging will be done
- delta_freqfloat
Bandwidth over which averaging will be done
- delta_thetafloat
Distance from phase center
- resolutionfloat
Resolution of restoring beam
- Returns:
- reduction_facgtorfloat
Ratio of pre-to-post averaging peak flux density
- get_nearest_freqstep(freqstep)¶
Gets the nearest frequency step to the target one
- Parameters:
- freqstepint
Target frequency step
- Returns:
- optimum_stepint
Optimum frequency step nearest to target step
- get_target_bandwidth(freq, delta_theta, resolution, reduction_factor)¶
Returns the bandwidth for given peak flux density reduction factor
- Parameters:
- freqfloat
Frequency at which averaging will be done
- delta_thetafloat
Distance from phase center
- resolutionfloat
Resolution of restoring beam
- reduction_factorfloat
Ratio of pre-to-post averaging peak flux density
- Returns:
- delta_freqfloat
Bandwidth over which averaging will be done
- get_target_timewidth(delta_theta, resolution, reduction_factor)¶
Returns the time width for given peak flux density reduction factor
- Parameters:
- delta_thetafloat
Distance from phase center
- resolutionfloat
Resolution of restoring beam
- reduction_factorfloat
Ratio of pre-to-post averaging peak flux density
- Returns:
- delta_timefloat
Time width in seconds for target reduction_factor
- scan_ms()¶
Scans input MS and stores info
- set_calibration_parameters(parset, ndir, nobs, calibrator_fluxes, target_fast_timestep, target_slow_timestep_joint, target_slow_timestep_separate, target_fulljones_timestep, target_flux=None)¶
Sets the calibration parameters
- Parameters:
- parsetdict
Parset with processing parameters
- ndirint
Number of calibration directions/patches
- nobsint
Number of observations in total
- calibrator_fluxeslist
List of calibrator apparent flux densities in Jy
- target_fast_timestepfloat
Target solution interval for fast solves in sec
- target_slow_timestep_jointfloat
Target solution interval for joint slow solves in sec
- target_slow_timestep_separatefloat
Target solution interval for separate slow solves in sec
- target_fulljones_timestepfloat
Target solution interval for full-Jones solves in sec
- target_flux: float, optional
Target calibrator flux in Jy. If None, the lowest calibrator flux density is used.
- set_imaging_parameters(sector_name, cellsize_arcsec, max_peak_smearing, width_ra, width_dec, solve_fast_timestep, solve_slow_freqstep, use_screens)¶
Sets the imaging parameters
- Parameters:
- sector_namestr
Name of sector for which predict is to be done
- cellsize_arcsecfloat
Pixel size in arcsec for imaging
- width_rafloat
Width in RA of image in degrees
- width_decfloat
Width in Dec of image in degrees
- solve_fast_timestepfloat
Solution interval in sec for fast solve
- solve_slow_freqstepfloat
Solution interval in Hz for slow solve
- use_screensbool
If True, use setup appropriate for screens
- set_prediction_parameters(sector_name, patch_names)¶
Sets the prediction parameters
- Parameters:
- sector_namestr
Name of sector for which predict is to be done
- patch_nameslist
List of patch names to predict