mycoords module

Module for basic coordinate creation.

mycoords.calc_image_origin(x_limits=None, y_limits=None, delta_x=0.01, delta_y=0.01, coord_type='equatorial', ref_wcs=(0.0, 0.0))[source]

Calculates pixel coordinates of an image at x-coord, y-coord = (0.0, 0.0) degrees in either equatorial or galactic coordinates.


x_limits : tuple

Upper and lower limits of x-coord in degrees.

y_limits : tuple

Upper and lower limits of y-coord in degrees.’

delta_x : float

Arclength of x-coord in degrees.

delta_y : float

Arclength of y-coord in degrees.

coord_type : str, optional

‘equatorial’ or ‘galactic’

ref_wcs : tuple, optional

Reference x and y coordinates in degrees. Default is (0.0, 0.0), which is needed to be read by unsophisticated programs like Kvis.


ref_pixel : tuple

Reference right ascension and declination in pixels for reference coordinates.

npix : tuple

Number of pixels along right ascension and declinations axes.

mycoords.convert_limit_coordinates(prop_dict, coords=('region_limit', 'co_noise_limits', 'plot_limit'), header=None)[source]
mycoords.get_pix_coords(ra=None, dec=None, header=None)[source]

Ra and dec in (hrs,min,sec) and (deg,arcmin,arcsec), or Ra in degrees and dec in degrees.

mycoords.hrs2degs(ra=None, dec=None)[source]

Ra and dec tuples in hrs min sec and deg arcmin arcsec.

mycoords.load_ds9_region(props, filename=None, header=None, key='regions')[source]

Creates the velocity axis given a pyfits header. Assumes the third axis is the velocity axis in km/s using the radio definition.