Utility
rascil.processing_components.util.array_functions Module
Useful array functions.
Functions
|
Average the array arr with weights by chunks |
|
Average the two dimensional array arr with weights by chunks |
|
Calculate the Tukey (tapered cosine) filter |
|
Insert point into image using specified function |
|
Insertion with Lanczos function |
|
Insertion with PSWF |
Insertion with Sinc function |
rascil.processing_components.util.compass_bearing Module
Functions
|
Calculates the bearing between two points. |
rascil.processing_components.util.coordinate_support Module
Coordinate support
We follow the casa definition of coordinate systems http://casa.nrao.edu/Memos/CoordConvention.pdf :
UVW is a right-handed coordinate system, with W pointing towards the source, and a baseline convention of \(ant2 - ant1\) where \(index(ant1) < index(ant2)\). Consider an XYZ Celestial coordinate system centered at the location of the interferometer, with \(X\) towards the East, \(Z\) towards the NCP and \(Y\) to complete a right-handed system. The UVW coordinate system is then defined by the hour-angle and declination of the phase-reference direction such that
when the direction of observation is the NCP (ha=0,dec=90), the UVW coordinates are aligned with XYZ,
V, W and the NCP are always on a Great circle,
when W is on the local meridian, U points East
when the direction of observation is at zero declination, an hour-angle of -6 hours makes W point due East.
The \((l,m,n)\) coordinates are parallel to \((u,v,w)\) such that \(l\) increases with Right-Ascension (or increasing longitude coordinate), \(m\) increases with Declination, and \(n\) is towards the source. With this convention, images will have Right Ascension increasing from Right to Left, and Declination increasing from Bottom to Top.
Functions
|
Rotate local XYZ coordinates into celestial XYZ coordinates. |
|
Calculate baselines in \((u,v,w)\) co-ordinate system for a range of hour angles (i.e. |
|
Rotate \((x,y,z)\) positions in earth coordinates to \((u,v,w)\) coordinates relative to astronomical source position \((ha, dec)\). |
|
Rotate \((x,y,z)\) positions relative to a sky position at \((ha, dec)\) to earth coordinates. |
|
Transforms UVW baseline coordinates such that the image is transformed with the given matrix. |
|
Simulate visibilities for unit amplitude point source at direction cosines (l,m) relative to the phase centre. |
|
Convert astropy sky coordinates into the l,m,n coordinate system relative to a phase centre. |
|
Convert l,m,n coordinate system + phascentre to astropy sky coordinate relative to a phase centre. |
|
Shift visibilities by the given image-space distance. |
|
Converting Az El to HA Dec |
|
Convert HA Dec to Az El |
|
Compute baselines in uvw co-ordinate system from uvw co-ordinate system station positions |
|
Calculate parallactic angle and zenith angle of source at ha, dec observed from site at latitude dec |
|
Calculate parallactic angle of source at ha, dec observed from site at latitude dec |
|
Convert ENU to XYZ coordinates. |
|
Convert WGS84 spherical coordinates to ECEF cartesian coordinates. |
|
Convert earth-centered, earth-fixed coordinates to (rad), longitude (rad), elevation (m) using Bowring's method. |
|
Convert ENU coordinates relative to reference location to ECEF coordinates. |
|
Convert ECEF coordinates to ENU coordinates relative to reference location. |
|
Rotate \((x,y,z)\) positions in earth coordinates to \((u,v,w)\) coordinates relative to astronomical source position \((ha, dec)\). |
|
Rotate \((x,y,z)\) positions relative to a sky position at \((ha, dec)\) to earth coordinates. |
|
Converts a baseline in earth-centered inertial coordinates [x, y, z] to [east, north, elevation] for that baseline. |
|
Converts a baseline in [east, north, elevation] to earth-centered inertial coordinates for that baseline [x, y, z]. |
rascil.processing_components.util.geometry Module
geometry
Functions
|
Find the UTC time of the nearest transit |
|
Return hour angles for location, utc_time, and direction |
|
Return hour angles for location, utc_time, and direction |
|
Return az el for a location, utc_time, and direction |
|
Convert an timestamp to seconds (epoch values) |
rascil.processing_components.util.installation_checks Module
Function to check the installation
Functions
|
Check the RASCIL data directory to see if it has been installed correctly |
rascil.processing_components.util.sizeof Module
From https://goshippo.com/blog/measure-real-size-any-python-object/
Functions
|
Return size of object in bytes |
rascil.processing_components.util.performance Module
Functions for monitoring performance
These functions can be used to write various configuration and performance information to JSON files for subsequent analysis. These are intended to be used by apps such as rascil-imager:
parser = cli_parser()
args = parser.parse_args()
performance_environment(args.performance_file, mode="w")
performance_store_dict(args.performance_file, "cli_args", vars(args), mode="a")
performance_store_dict(args.performance_file, "dask_profile", dask_info, mode="a")
performance_dask_configuration(args.performance_file, mode='a')
Functions
|
Get the hash for this git repository. |
|
Store dictionary in a file using json |
|
Store image qa in a performance file |
|
Get selected Dask configuration info and write to performance file |
|
Read the performance file |
|
Get info about the visibility |
|
Write the current processing environment to JSON file |
|
Get the memusage data. |
|
Merge memory data per function into performance data |