fluxcompensator.utils.units.ConvertUnits¶
-
class
fluxcompensator.utils.units.ConvertUnits(wav, val)¶ Tool to convert units of val arrays.
Parameters: wav : numpy.ndarray
The wavelength of the val image in microns.
val : numpy.ndarray
Flux array from 3D to 0D.
Methods
get_unit(in_units, out_units[, distance, ...])Convert val units from cgs to Jy like units. Methods (detail)
-
get_unit(in_units, out_units, distance=None, FOV=None, pixel=None, input_resolution=None, zero_point=None)¶ Convert val units from cgs to Jy like units.
Parameters: in_units : str
Unit of input val array. Valid options are:
'ergs/cm^2/s''ergs/cm^2/s/Hz''Jy''mJy''MJy/sr''mag'
out_units : str
Unit of output val array. Valid options are:
'ergs/cm^2/s''ergs/cm^2/s/Hz''Jy''mJy''MJy/sr''mag'
distance : float
Only needed if in_units or out_units is
'MJy/sr'. Distance of observed object in cm.FOV : tuple
Only needed if in_units or out_units is
'MJy/sr'. FOV (x,y) of observed object in cm.pixel : tuple
Only needed if in_units or out_units is
'MJy/sr'. Pixel in (x,y) direction.input_resolution : float
Only needed if in_units or out_units is
'MJy/sr'. Force resolution to certain val in arcsec / pixel if any of FOV, pixel and distance are not known.zero_point : float
Zero-magnitude flux is need, if one wants to convert to
mag.zero_pointneeds to be given inJy. Default isNone.Returns: val : numpy.ndarray
Flux array from 3D to 0D in units of out_units.
-