emirdrp.instrument
— Static configuration¶
EMIR constants
-
emirdrp.instrument.channels.
braid
(*iterables)¶ Return the elements of each iterator in turn until some is exhausted. This function is similar to the roundrobin example in itertools documentation. >>> a = iter([1,2,3,4]) >>> b = iter([‘a’, ‘b’]) >>> c = iter([1,1,1,1,’a’, ‘c’]) >>> d = iter([1,1,1,1,1,1]) >>> list(braid(a, b, c, d)) [1, ‘a’, 1, 1, 2, ‘b’, 1, 1]
-
emirdrp.instrument.channels.
convert_name_to_channels
(conf)¶
-
class
emirdrp.instrument.csu_configuration.
CsuConfiguration
¶ Configurable Slit Unit (CSU) Configuration class definition.
- _csu_bar_left : list of floats
- Location (mm) of the left bar for each slitlet.
- _csu_bar_right : list of floats
- Location (mm) of the right bar for each slitlet, using the same origin employed for _csu_bar_left (which is not the value stored in the FITS keywords.
- _csu_bar_slit_center : list of floats
- Middle point (mm) in between the two bars defining a slitlet.
- _csu_bar_slit_width : list of floats
- Slitlet width (mm), computed as the distance between the two bars defining the slitlet.
-
csu_bar_left
(islitlet)¶ Return csu_bar_left for requested slitlet number.
-
csu_bar_right
(islitlet)¶ Return csu_bar_right for requested slitlet number.
-
csu_bar_slit_center
(islitlet)¶ Return csu_bar_slit_center for requested slitlet number.
-
csu_bar_slit_width
(islitlet)¶ Return csu_bar_slit_width for requested slitlet number.
-
classmethod
define_from_fits
(fitsobj, extnum=0)¶ Define class members from header information in FITS file.
- fitsobj: file object
- FITS file whose header contains the CSU bar information needed to initialise the members of this class.
- extnum : int
- Extension number (first extension is 0)
-
classmethod
define_from_header
(image_header)¶ Define class members directly from FITS header.
- image_header : instance of hdulist.header
- Header content from a FITS file.
-
outdict
(ndigits=3)¶ Return dictionary structure rounded to a given precision.
-
emirdrp.instrument.csu_configuration.
merge_odd_even_csu_configurations
(conf_odd, conf_even)¶ Merge CSU configuration using odd- and even-numbered values.
The CSU returned CSU configuration include the odd-numbered values from ‘conf_odd’ and the even-numbered values from ‘conf_even’.
- conf_odd : CsuConfiguration instance
- CSU configuration corresponding to odd-numbered slitlets.
- conf_even : CsuConfiguration instance
- CSU configuration corresponding to even-numbered slitlets.
- merged_conf : CsuConfiguration instance
- CSU configuration resulting from the merging process.
-
emirdrp.instrument.distortions.
exvp
(pos_x, pos_y)¶
-
emirdrp.instrument.distortions.
pvex
(pos_x, pos_y)¶
-
class
emirdrp.instrument.dtu_configuration.
DtuConfiguration
¶ Detector Translation Unit (DTU) Configuration class definition.
- xdtu : float
- XDTU fits keyword value.
- ydtu : float
- YDTU fits keyword value.
- zdtu : float
- ZDTU fits keyword value.
- xdtu_0 : float
- XDTU_0 fits keyword value.
- ydtu_0 : float
- YDTU_0 fits keyword value.
- zdtu_0 : float
- ZDTU_0 fits keyword value.
-
closeto
(other, abserror)¶ Check that all the members are equal within provided absolute error.
- other : DtuConfiguration object
- DTU configuration instance to be compared with self.
- abserror : float
- Absolute maximum allowed error.
- result : bool
- True is all members are within the specified maximum absolute error
-
classmethod
define_from_dictionary
(inputdict)¶ Define class object from dictionary.
- inputdict : dictionary like object
- Dictionary like object defining each member of the class.
-
classmethod
define_from_fits
(fitsobj, extnum=0)¶ Define class object from header information in FITS file.
- fitsobj: file object
- FITS file whose header contains the DTU information needed to initialise the members of this class.
- extnum : int
- Extension number (first extension is 0)
-
classmethod
define_from_header
(image_header)¶ Define class object directly from FITS header.
- image_header : instance of hdulist.header
- Header content from a FITS file.
-
classmethod
define_from_values
(xdtu, ydtu, zdtu, xdtu_0, ydtu_0, zdtu_0)¶ Define class object from from provided values.
- xdtu : float
- XDTU fits keyword value.
- ydtu : float
- YDTU fits keyword value.
- zdtu : float
- ZDTU fits keyword value.
- xdtu_0 : float
- XDTU_0 fits keyword value.
- ydtu_0 : float
- YDTU_0 fits keyword value.
- zdtu_0 : float
- ZDTU_0 fits keyword value.
-
outdict
(ndigits=3)¶ Return dictionary structure rounded to a given precision.
-
emirdrp.instrument.dtu_configuration.
average_dtu_configurations
(list_of_objects)¶ Return DtuConfiguration instance with averaged values.
- list_of_objects : python list
- List of DtuConfiguration instances to be averaged.
- result : DtuConfiguration instance
- Object with averaged values.
-
emirdrp.instrument.dtu_configuration.
maxdiff_dtu_configurations
(list_of_objects)¶ Return DtuConfiguration instance with maximum differences.
- list_of_objects : python list
- List of DtuConfiguration instances to be averaged.
- result : DtuConfiguration instance
- Object with averaged values.