pyhrs:docs

hrs_process

pyhrs.hrs_process(image_name, ampsec=, []oscansec=, []trimsec=, []masterbias=None, error=False, bad_pixel_mask=None, flip=False, rdnoise=None, oscan_median=True, oscan_model=None)[source] [edit on github]
Processing required for HRS observations. If the images have multiple
amps, then this will process each part of the image and recombine them into for the final results
Parameters:

image_name: str

Name of file to be processed

ampsec: list

List of ampsections. This list should have the same length as the number of amps in the data set. The sections should be given in the format of fits_sections (see below).

oscansec: list

List of overscan sections. This list should have the same length as the number of amps in the data set. The sections should be given in the format of fits_sections (see below).

trimsec: list

List of overscan sections. This list should have the same length as the number of amps in the data set. The sections should be given in the format of fits_sections (see below).

error: boolean

If True, create an uncertainty array for ccd

masterbias: None, `~numpy.ndarray`, or `~ccdproc.CCDData`

A materbias frame to be subtracted from ccd.

bad_pixel_mask: None or `~numpy.ndarray`

A bad pixel mask for the data. The bad pixel mask should be in given such that bad pixels havea value of 1 and good pixels a value of 0.

flip: boolean

If True, the image will be flipped such that the orders run from the bottom of the image to the top and the dispersion runs from the left to the right.

rdnoise: None or `~astropy.Quantity`

Read noise for the observations. The read noise should be in electron

oscan_median : bool, optional

If true, takes the median of each line. Otherwise, uses the mean

oscan_model : Model, optional

Model to fit to the data. If None, returns the values calculated by the median or the mean.

Returns:

ccd: CCDData

Data processed and

Notes

The format of the fits_section string follow the rules for slices that are consistent with the FITS standard (v3) and IRAF usage of keywords like TRIMSEC and BIASSEC. Its indexes are one-based, instead of the python-standard zero-based, and the first index is the one that increases most rapidly as you move through the array in memory order, opposite the python ordering.

The ‘fits_section’ argument is provided as a convenience for those who are processing files that contain TRIMSEC and BIASSEC. The preferred, more pythonic, way of specifying the overscan is to do it by indexing the data array directly with the overscan argument.

Page Contents