The Sector class¶
The Sector class is used to manage imaging parameters for an image.
- class rapthor.lib.sector.Sector(name, ra, dec, width_ra, width_dec, field)¶
The Sector object contains various parameters for a sector of the field. Sectors are used only in image and predict operations
- Parameters:
- namestr
Name of sector
- rafloat
RA in degrees of sector center
- decfloat
Dec in degrees of sector center
- width_rafloat
Width of sector in RA degrees
- width_decfloat
Width of sector in Dec in degrees
- fieldField object
Field object
- filter_skymodel(skymodel)¶
Filters input skymodel to select only sources that lie inside the sector
- Parameters:
- skymodelLSMTool skymodel object
Input sky model
- Returns:
- filtered_skymodelLSMTool skymodel object
Filtered sky model
- get_distance_to_obs_center()¶
Return the overall minimum and maximum distance in degrees from any sector vertex (and sector center) to the phase center of the observation
- Returns:
- min_dist, max_distfloat, float
Minimum and maximum distance in degrees
- get_nwavelengths(cellsize_deg, timestep_sec)¶
Returns nwavelengths for WSClean BL-based averaging
The value depends on the integration time given the specified maximum allowed smearing. We scale it from the imaging cell size assuming normal sampling as:
max baseline in nwavelengths = 1 / theta_rad ~= 1 / (cellsize_deg * 3 * pi / 180) nwavelengths = max baseline in nwavelengths * 2 * pi * integration time in seconds / (24 * 60 * 60) / 4
- Parameters:
- cellsize_degfloat
Pixel size of image in degrees
- timestep_secfloat
Length of one timestep in seconds
- get_obs_parameters(parameter)¶
Returns list of parameters for all observations
- Parameters:
- parameterstr
Name of parameter to return
- Returns:
- parameterslist
List of parameters, with one entry for each observation
- get_vertices_radec()¶
Return the vertices as RA, Dec for the sector boundary
- intialize_vertices()¶
Determines the vertices of the sector polygon
- make_region_file(outputfile, region_format='ds9')¶
Make a ds9 or CASA region file for the sector boundary
- Parameters:
- outputfilestr
Name of output region file
- region_formatstr, optional
Format of region file: ‘ds9’ or ‘casa’
- make_skymodel(index)¶
Makes predict sky model
- Parameters:
- indexint
Iteration index
- make_vertices_file()¶
Make a vertices file for the sector boundary
- set_imaging_parameters(do_multiscale=False, recalculate_imsize=False)¶
Sets the parameters needed for the imaging operation
- Parameters:
- do_multiscalebool, optional
If True, multiscale clean is done
- recalculate_imsizebool, optional
If True, the image size is recalculated based on the current sector region
- set_prediction_parameters()¶
Sets the predict parameters