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
- convert_mjd(mjd_sec)¶
Converts MJD to casacore MVTime
- Parameters:
- mjd_secfloat
MJD time in seconds
- Returns:
- mvtimestr
Casacore MVTime string
- 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_frequstep(freqstep)¶
Gets the nearest frequstep
- 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)¶
Sets the calibration parameters
- Parameters:
- parsetdict
Parset with processing parameters
- ndirint
Number of calibration directions/patches
- nobsint
Number of observations in total
- 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, scratch_dir)¶
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
- scratch_dirstr
Scratch directory path