pipeline.core package

Submodules

pipeline.core.check_version module

v1.0.0
  • First public release.
pipeline.core.check_version.am_i_updated(version)
pipeline.core.check_version.get_last(url='https://api.github.com/repos/soar-telescope/goodman/releases/latest')

Returns the version of the last release on GitHub.

Parameters:(str, optinal) (url) –
Returns:version (LooseVersion)
Return type:the last version of the pipeline.

pipeline.core.core module

class pipeline.core.core.GenerateDcrParFile(par_file_name='dcr.par')

Bases: object

Creates dcr.par file based on lookup table

dcr parameters depend heavily on binning, this class generates a file using the default format. The lookup table considers camera and binning.

class pipeline.core.core.NightDataContainer(path, instrument, technique)

Bases: object

This class is designed to be the organized data container. It doesn’t store image data but a list of DataFrame objects. Also it stores critical variables such as sunrise and sunset times.

add_bias(bias_group)

Adds a bias group

Parameters:bias_group (object) – A DataFrame Contains a set of keyword values of grouped image metadata
add_comp_group(comp_group)

Adds a comp-only group

All comparison lamps groups are added here. The ones that may have been taken in the afternoon (isolated) or along science target. This will act as a pool of comparison lamp groups for eventual science targets taken without comparison lamps.

Parameters:comp_group (object) – A DataFrame Contains a set of keyword values of grouped image metadata
add_data_group(data_group)

Adds a data group

Parameters:data_group (object) – A DataFrame Contains a set of keyword values of grouped image metadata
add_day_flats(day_flats)

“Adds a daytime flat group

Parameters:day_flats (object) – A DataFrame Contains a set of keyword values of grouped image metadata
add_object_group(object_group)

Adds a object-only group

Parameters:object_group (object) – A DataFrame Contains a set of keyword values of grouped image metadata
add_spec_group(spec_group)

Adds a data group containing object and comp

The comparison lamp groups are also added to a general pool of comparison lamps.

Parameters:spec_group (object) – A DataFrame Contains a set of keyword values of grouped image metadata
data_groups = None

For spectroscopy use

is_empty = None

For imaging use

set_readout(gain, rdnoise, roi)

Set Gain, Read noise and ROI.

Parameters:
  • gain (float) – Gain from header
  • rdnoise (float) – Read noise from header.
  • roi (str) – ROI from header.
set_sun_times(sun_set, sun_rise)

Sets values for sunset and sunrise

Parameters:
  • sun_set (str) – Sun set time in the format ‘YYYY-MM-DDTHH:MM:SS.SS’
  • sun_rise (str) – Sun rise time in the format ‘YYYY-MM-DDTHH:MM:SS.SS’
set_twilight_times(evening, morning)

Sets values for evening and morning twilight

Parameters:
  • evening (str) – Evening twilight time in the format ‘YYYY-MM-DDTHH:MM:SS.SS’
  • morning (str) – Morning twilight time in the format ‘YYYY-MM-DDTHH:MM:SS.SS’
spec_groups = None

Time reference points

exception pipeline.core.core.NoMatchFound

Bases: Exception

Exception for when no match is found.

exception pipeline.core.core.NoTargetException

Bases: Exception

Exception to be raised when no target is identified

exception pipeline.core.core.NotEnoughLinesDetected

Bases: Exception

Exception for when there are no lines detected.

class pipeline.core.core.ReferenceData(reference_dir)

Bases: object

Contains spectroscopic reference lines values and filename to templates.

This class stores:
  • file names for reference fits spectrum
  • file names for CSV tables with reference lines and relative intensities
  • line positions only for the elements used in SOAR comparison lamps
check_comp_group(comp_group)

Check if comparison lamp group has matching reference lamps

Parameters:comp_group (object) – A DataFrame instance that contains meta-data for a group of comparison lamps.

Returns:

get_reference_lamp(header)

Finds a suitable template lamp from the catalog

Parameters:header (object) – FITS header of image we are looking a a reference lamp.
Returns:full path to best matching reference lamp.
lamp_exists(object_name, grating, grt_targ, cam_targ)

Checks whether a matching lamp exist or not

Parameters:
  • object_name (str) – Name of the lamp from ‘OBJECT’ keyword.
  • grating (str) – Grating from ‘GRATING’ keyword.
  • grt_targ (str) – Grating target from keyword ‘GRT_TARG’.
  • cam_targ (str) – Camera target from keyword ‘CAM_TARG’.
Returns:

True of False depending if a single matching lamp exist.

Raises:

NotImplementedError if there are more than one lamp found.

class pipeline.core.core.SpectroscopicMode

Bases: object

get_cam_grt_targ_angle(grating, mode)

Get the camera and grating target values grating and mode

Parameters:
  • grating (float) – Grating frequency in lines/mm (unitless value)
  • mode (str) – Name of the grating’s mode for which the camera and grating target values are required.
Returns:

Camera and grating target values. None and None if no such values exists.

get_mode(grating, camera_targ, grating_targ, blocking_filter)

Get the camera’s optical configuration mode.

This method is useful for data that does not have the WAVMODE keyword

Parameters:
  • grating (str) – Grating frequency as string
  • camera_targ (str) – Camera target angle as in the header.
  • grating_targ (str) – Grating target angle as in the header.
  • blocking_filter (str) – Order blocking filter listed on the header.
Returns:

string that defines the wavelength mode used

pipeline.core.core.add_wcs_keys(ccd)

Adds generic keyword for linear wavelength solution to the header

Linear wavelength solutions require a set of standard fits keywords. Later on they will be updated accordingly. The main goal of putting them here is to have consistent and nicely ordered headers.

Notes

This does NOT add a WCS solution, just the keywords.

Parameters:ccd (object) – A :class:~astropy.nddata.CCDData` instance with no wcs keywords.
Returns:
A CCDData instance with modified header with added
WCS keywords
Return type:ccd (object)
pipeline.core.core.astroscrappy_lacosmic(ccd, red_path=None, save_mask=False)
pipeline.core.core.call_cosmic_rejection(ccd, image_name, out_prefix, red_path, dcr_par, keep_files=False, prefix='c', method='dcr', save=False)

Call for the appropriate cosmic ray rejection method

There are four options when dealing with cosmic ray rejection in this pipeline, The default option is called default and it will choose the rejection method based on the binning of the image. Note that there are only two real methdos: dcr and lacosmic.

For binning 1x1 the choice will be dcr for binning 2x2 and 3x3 will be lacosmic.

The method dcr is a program written in C by Wojtek Pych (http://users.camk.edu.pl/pych/DCR/) that works very well for spectroscopy the only negative aspect is that integration with python was difficult and not natively (through subprocess).

The method lacosmic is well known but there are different implementations, we started using cosmicray_lacosmic() but later we shifted towards astroscrappy.detect_cosmics. The LACosmic method was developed by Pieter G. van Dokkum. See <http://www.astro.yale.edu/dokkum/lacosmic/>

There is also the option of skipping cosmic ray removal by using none.

Parameters:
  • ccd (object) – a CCDData instance.
  • image_name (str) – Science image name.
  • out_prefix (str) – Partial prefix to be added to the image name. Related to previous processes and not cosmic ray rejection.
  • red_path (str) – Path to reduced data directory.
  • dcr_par (str) – Path to dcr.par file.
  • keep_files (bool) – If True, the original file and the cosmic ray mask will not be deleted. Default is False.
  • prefix (str) – Cosmic ray rejection related prefix to be added to image name.
  • method (str) – Method to use for cosmic ray rejection. There are four options: default, dcr, lacosmic and none.
  • save (bool) – Disables by default saving the images
Returns:

CCDData instance and out_prefix which is the prefix added to the image name.

Raises:
  • NotImplementedError if the method argument is not dcr, lacosmic
  • nor none.
pipeline.core.core.classify_spectroscopic_data(path, search_pattern)

Classify data by grouping them by a set of keywords.

This function uses ImageFileCollection. First it creates a collection of information regarding the images located in path that match the pattern search_pattern. The information obtained are all keywords listed in the list keywords. The ImageFileCollection object is translated into DataFrame and then is used much like an SQL database to select and filter values and in that way put them in groups that are DataFrame instances. The keywords retrieved are: - date - slit - date-obs - obstype - object - exptime - obsra - obsdec - grating - cam_targ - grt_targ - filter - filter2 - gain - rdnoise.

Then all data is grouped by matching the following keywords:

  • slit
  • radeg
  • decdeg
  • grating
  • cam_targ
  • grt_targ
  • filter
  • filter2
  • gain
  • rdnoise

And finally, every group is classified as: a comparison lamp-only group, an object-only group or a group of object and comparison lamps. The comparison lamps present in the last group (COMP + OBJECT) are also added in the first one (COMP-only).

Parameters:
  • path (str) – Path to data location
  • search_pattern (str) – Prefix to match files.
Returns:

Instance of pipeline.core.core.NightDataContainer

pipeline.core.core.combine_data(image_list, dest_path, prefix=None, output_name=None, method='median', save=False)

Combine a list of CCDData instances.

Parameters:
  • image_list (list) – Each element should be an instance of CCDData
  • dest_path (str) – Path to where the new image should saved
  • prefix (str) – Prefix to add to the image file name
  • output_name (str) – Alternatively a file name can be parsed, this will ignore prefix.
  • method (str) – Method for doing the combination, this goes straight to the call of ccdproc.combine function.
  • save (bool) – If True will save the combined images. If False it will ignore prefix or output_name.
Returns:

A combined image as a CCDData object.

pipeline.core.core.convert_time(in_time)

Converts time to seconds since epoch

Parameters:in_time (str) – time obtained from header’s keyword DATE-OBS
Returns:time in seconds since epoch
pipeline.core.core.dcr_cosmicray_rejection(data_path, in_file, prefix, dcr_par_dir, keep_cosmic_files=False, save=True)

Runs an external code for cosmic ray rejection

DCR was created by Wojtek Pych and the code can be obtained from http://users.camk.edu.pl/pych/DCR/ and is written in C. Contrary to ccdproc’s LACosmic it actually applies the correction, and also doesn’t update the mask attribute since it doesn’t work with CCDData instances.

The binary takes three positional arguments, they are: 1. input image, 2. output image and 3. cosmic rays image. Also it needs that a dcr.par file is located in the directory. All this is implemented in this function, if delete is True it will remove the original image and the cosmic rays image. The removal of the original image is absolutely safe when used in the context of the goodman pipeline, however if you want to implement it somewhere else, be careful.

Notes

This function operates an external code therefore it doesn’t return anything natively, instead it creates a new image. A workaround has been created that loads the new image and deletes the file.

Parameters:
  • data_path (str) – Data location
  • in_file (str) – Name of the file to have its cosmic rays removed
  • prefix (str) – Prefix to add to the file with the cosmic rays removed
  • dcr_par_dir (str) – Directory of default dcr.par file
  • keep_cosmic_files (bool) – True for deleting the input and cosmic ray file.
  • save (bool) – Toggles the option of saving the image.
pipeline.core.core.extract_fractional_pixel(ccd, target_trace, target_stddev, extraction_width, background_spacing=3)

Performs an spectrum extraction using fractional pixels.

Parameters:
  • ccd (object) – Instance of CCDData that contains a 2D spectrum.
  • target_trace (object) – Instance of astropy.modeling.models.Model that defines the trace of the target on the image (ccd).
  • target_stddev (float) – Standard deviation value for the spatial profile fitted to the target.
  • extraction_width (int) – Width of the extraction area as a function of target_stddev. For instance if extraction_with is set to 1 the function extract 0.5 to each side from the center of the traced target.
  • background_spacing (float) – Number of target_stddev to separate the target extraction to the background. This is from the edge of the extraction zone to the edge of the background region.
pipeline.core.core.extract_optimal()

Placeholder for optimal extraction method.

Raises:NotImplementedError
pipeline.core.core.extraction(ccd, target_trace, spatial_profile, extraction_name)

Calls appropriate spectrum extraction routine

This function calls the appropriate extraction function based on extraction_name

Notes

Optimal extraction is not implemented.

Parameters:
  • ccd (object) – Instance of CCDData containing a 2D spectrum
  • target_trace (object) – Instance of astropy.modeling.Model, a low order polynomial that defines the trace of the spectrum in the ccd object.
  • spatial_profile (object) – Instance of astropy.modeling.Model, a Gaussian model previously fitted to the spatial profile of the 2D spectrum contained in the ccd object.
  • extraction_name (str) – Extraction type, can be fractional or optimal though the optimal extraction is not implemented yet.
Returns:

Instance of CCDData containing a 1D spectrum. The attribute ‘data’ is replaced by the 1D array resulted from the extraction process.

Return type:

ccd (object)

Raises:

NotImplementedError – When extraction_name is optimal.

pipeline.core.core.fix_keywords(path, pattern='*.fits')

Fix FITS uncompliance of some keywords

Uses automatic header fixing by CCDData. Note that this only fixes FITS compliance.

Parameters:
  • path (str) – Path to raw data
  • pattern (str) – Search pattern for listing file in path.
pipeline.core.core.fractional_sum(data, index, low_limit, high_limit)

Performs a fractional pixels sum

A fractional pixels sum is required several times while extracting a 1D spectrum from a 2D spectrum. The method is actually very simple.

It requires the full data, the column and the range to sum, this range is given as real numbers. First it separates the limits values as an integer and fractional parts. Then it will sum the integer’s interval and subtract the low_limit’s fractional part and sum the high_limit’s fractional part.

The sum is performed in one operation. It does not do background subtraction, for which this very same method is used to get the background sum to be subtracted later.

Parameters:
  • data (numpy.ndarray) – 2D array that contains the 2D spectrum/image
  • index (int) – Index of the column to be summed.
  • low_limit (float) – Lower limit for the range to be summed.
  • high_limit (float) – Higher limit for the range to be summed.
Returns:

Sum in ADU of all pixels and fractions between low_limit and high_limit.

pipeline.core.core.get_best_flat(flat_name, path)

Look for matching master flat

Given a basename for master flats defined as a combination of key parameters extracted from the header of the image that we want to flat field, this function will find the name of the files that matches the base name and then will choose the first. Ideally this should go further as to check signal, time gap, etc. After it identifies the file it will load it using CCDData and return it along the filename. In the case it fails it will return None instead of master_flat and another None instead of master_flat_name.

Parameters:
  • flat_name (str) – Full path of master flat basename. Ends in ‘*.fits’ for using glob.
  • path (str) – Location to look for flats.
Returns:

A CCDData instance. master_flat_name (str): Full path to the chosen master flat.

Return type:

master_flat (object)

pipeline.core.core.get_central_wavelength(grating, grt_ang, cam_ang)

Calculates the central wavelength for a given spectroscopic mode

The equation used to calculate the central wavelength is the following

Parameters:
  • grating (str) – Grating frequency as a string. Example ‘400’.
  • grt_ang (str) – Grating Angle as a string. Example ‘12.0’.
  • cam_ang (str) – Camera Angle as a string. Example ‘20.0’
Returns:

Central wavelength as a float value.

Return type:

central_wavelength (float)

pipeline.core.core.get_slit_trim_section(master_flat)

Find the slit edges to trim all data

Using a master flat, ideally with good signal to noise ratio, this function will identify the edges of the slit projected into the detector. Having this done will allow to reduce the overall processing time and also reduce the introduction of artifacts due to non-illuminated regions in the detectors, such as NaNs -INF +INF, etc.

Parameters:master_flat (object) – A CCDData instance.
Returns:
Trim section in spatial direction in the format
[:,slit_lower_limit:slit_higher_limit]
Return type:slit_trim_section (str)
pipeline.core.core.get_twilight_time(date_obs)

Get end/start time of evening/morning twilight

Notes

Taken from David Sanmartim’s development

Parameters:date_obs (list) – List of all the dates from data.
Returns:
Evening twilight time in the format
’YYYY-MM-DDTHH:MM:SS.SS’
twilight_morning (str): Morning twilight time in the format
’YYYY-MM-DDTHH:MM:SS.SS’
sun_set_time (str): Sun set time in the format
’YYYY-MM-DDTHH:MM:SS.SS’
sun_rise_time (str): Sun rise time in the format
’YYYY-MM-DDTHH:MM:SS.SS’
Return type:twilight_evening (str)
pipeline.core.core.identify_targets(ccd, nfind=3, plots=False)

Identify spectroscopic targets in an image

This function collapses the image along the dispersion direction using a median, This highlights the spatial features present in a 2D spectrum (image), Then does a sigma clip to remove any features in order to fit the background level and shape, the fit is a linear function. Once the background has been removed it will equal to zero all negative values. It will perform a new sigma clipping but this time to determinate the background amplitude. Finally it finds all the peaks above the background level and pick the nfind largest ones.

Parameters:
  • ccd (object) – a CCDData instance.
  • nfind (int) – Maximum number of targets to be returned.
  • plots (bool) – To show debugging plots.
Returns:

an astropy.modeling.Model instance, it could be

a Gaussian1D or a list of Gaussian1D. Each of them represent a point source spectrum found. In the past a CompoundModel was returned but the processing of those was slightly more complicated than a list of Gaussian1Ds.

Return type:

profile_model (object)

pipeline.core.core.image_overscan(ccd, overscan_region, add_keyword=False)

Apply overscan correction to data

Uses ccdproc.subtract_overscan to perform the task.

Notes

The overscan_region argument uses FITS convention, just like IRAF, therefore is 1 based. i.e. it starts in 1 not 0.

Parameters:
  • ccd (object) – A CCDData instance to be overscan corrected.
  • overscan_region (str) – The overscan region in the format [x1:x2,y1:y2] where x is the spectral axis and y is the spatial axis.
  • add_keyword (bool) – Tells ccdproc whether to add a keyword or not. Default False.
Returns:

Overscan corrected CCDData instance

Return type:

ccd (object)

pipeline.core.core.image_trim(ccd, trim_section, trim_type='trimsec', add_keyword=False)

Trim image to a given section

Notes

The overscan_region argument uses FITS convention, just like IRAF, therefore is 1 based. i.e. it starts in 1 not 0.

Parameters:
  • ccd (object) – A CCDData instance.
  • trim_section (str) – The trimming section in the format [x1:x2,y1:y2] where x is the spectral axis and y is the spatial axis.
  • trim_type (str) – trimsec or slit trim.
  • add_keyword (bool) – Tells ccdproc whether to add a keyword or not. Default False.
Returns:

Trimmed CCDData instance

Return type:

ccd (object)

pipeline.core.core.interpolate(spectrum, interpolation_size)

Creates an interpolated version of the input spectrum

This method creates an interpolated version of the input array, it is used mainly for a spectrum but it can also be used with any unidimensional array. The reason for doing interpolation is that it allows to find the lines and its respective center more precisely.

Parameters:
  • spectrum (array) – an uncalibrated spectrum or any unidimensional array.
  • interpolation_size (int) – Number of points to interpolate. (points added between two existing ones)
Returns:

Two dimensional array containing x-axis and interpolated array.

The x-axis preserves original pixel values.

pipeline.core.core.normalize_master_flat(master, name, method='simple', order=15)

Master flat normalization method

This function normalize a master flat in three possible ways:

mean: simply divide the data by its mean

simple: Calculates the median along the spatial axis in order to obtain the dispersion profile. Then fits a Chebyshev1D model and apply this to all the data.

full: This is for experimental purposes only because it takes a lot of time to process. It will fit a model to each line along the dispersion axis and then divide it by the fitted model. I do not recommend this method unless you have a good reason as well as a very powerful computer.

Parameters:
  • master (object) – Master flat. Has to be a CCDData instance.
  • name (str) – Full path of master flat prior to normalization.
  • method (str) – Normalization method, ‘mean’, ‘simple’ or ‘full’.
  • order (int) – Order of the polynomial to be fitted.
Returns:

The normalized master flat. CCDData instance.

Return type:

master (object)

pipeline.core.core.ra_dec_to_deg(right_ascension, declination)

Converts right ascension and declination to degrees

Parameters:
  • right_ascension (str) – Right ascension in the format hh:mm:ss.sss
  • declination (str) – Declination in the format dd:mm:ss.sss
Returns:

Right ascension in degrees declination_deg (float): Declination in degrees

Return type:

right_ascension_deg (float)

pipeline.core.core.read_fits(full_path, technique='Unknown')

Read fits files while adding important information to the header

It is necessary to record certain data to the image header so that’s the reason for this wrapper of read() to exist. It will add the following keywords. In most cases, if the keyword already exist it will skip it except for GSP_FNAM, GSP_PATH and BUNIT. GSP_VERS: Goodman Spectroscopic Pipeline version number GSP_ONAM: Original File name GSP_PNAM: Parent file name or name of the file from which this one originated after some process or just a copy. GSP_FNAM: Current file name. GSP_PATH: Path to file at the moment of reading. GSP_TECH: Observing technique. Spectroscopy or Imaging. GSP_DATE: Date of first reading. GSP_OVER: Overscan region. GSP_TRIM: Trim section (region). GSP_SLIT: Slit trim section, obtained from the slit illuminated area. GSP_BIAS: Master bias image used. Default none. GSP_FLAT: Master flat image used. Default none. GSP_NORM: Flat normalization method. GSP_COSM: Cosmic ray rejection method. GSP_WRMS: Wavelength solution RMS Error. GSP_WPOI: Number of points used to calculate the wavelength solution Error. GSP_WREJ: Number of points rejected.

Parameters:
  • full_path (str) – Full path to file.
  • technique (str) – Observing technique. ‘Imaging’ or ‘Spectroscopy’.
Returns:

Instance of CCDData corresponding to the file from

full_path.

pipeline.core.core.save_extracted(ccd, destination, prefix='e', target_number=1)

Save extracted spectrum while adding a prefix.

Parameters:
  • ccd (object) – CCDData instance
  • destination (str) – Path where the file will be saved.
  • prefix (str) – Prefix to be added to images. Default e.
  • target_number (int) –
Returns:

CCDData instance of the image just recorded. although is not really necessary.

pipeline.core.core.search_comp_group(object_group, comp_groups, reference_data)

Search for a suitable comparison lamp group

In case a science target was observed without comparison lamps, usually right before or right after, this function will look for a compatible set obtained at a different time or pointing.

Notes

This methodology is not recommended for radial velocity studies.

Parameters:
  • object_group (object) – A DataFrame instances containing a group of images for a given scientific target.
  • comp_groups (list) – A list in which every element is a DataFrame that contains information regarding groups of comparison lamps.
  • reference_data (object) – Instance of goodman.pipeline.core.ReferenceData contains all information related to the reference lamp library.

Returns:

pipeline.core.core.setup_logging()

configures logging

Notes

Logging file name is set to default ‘goodman_log.txt’. If –debug is activated then the format of the message is different.

pipeline.core.core.trace(ccd, model, trace_model, model_fitter, sampling_step, nsigmas=2)

Find the trace of a spectrum

This function is called by the trace_targets function, the difference is that it only takes single models only not CompoundModels so this function is called for every single target. CompoundModels are a bit tricky when you need each model separated so all CompoundModels have been removed.

Notes

This method forces the trace to go withing a rectangular region of center model.mean.value and width 2 * nsigmas, this is for allowing the tracing of low SNR targets. The assumption is valid since the spectra are always well aligned to the detectors’s pixel columns. (dispersion axis)

Parameters:
  • ccd (object) – A CCDData instance, 2D image.
  • model (object) – An astropy.modeling.Model instance that contains information regarding the target to be traced.
  • trace_model (object) – An astropy.modeling.Model instance, usually a low order polynomial.
  • model_fitter (object) – An astropy.modeling.fitting.Fitter instance. Will fit the sampled points to construct the trace model
  • sampling_step (int) – Step for sampling the spectrum.
  • nsigmas (int) – Number of stddev to each side of the mean to be used for searching the trace.
Returns:

An astropy.modeling.Model instance, that defines the trace of the spectrum.

pipeline.core.core.trace_targets(ccd, target_list, sampling_step=5, pol_deg=2, nsigmas=10, plots=False)

Find the trace of the target’s spectrum on the image

This function defines a low order polynomial that trace the location of the spectrum. The attributes pol_deg and sampling_step define the polynomial degree and the spacing in pixels for the samples. For every sample a gaussian model is fitted and the center (mean) is recorded and since spectrum traces vary smoothly this value is used as a new center for the base model used to fit the spectrum profile.

Notes

This doesn’t work for extended sources. Also this calls for the function trace for doing the actual trace, the difference is that this method is at a higher level.

Parameters:
  • ccd (object) – Instance of CCDData
  • target_list (list) – List of single target profiles.
  • sampling_step (int) – Frequency of sampling in pixels
  • pol_deg (int) – Polynomial degree for fitting the trace
  • plots (bool) – If True will show plots (debugging)
  • nsigmas (int) – Number of sigmas to search for a target. default 10.
Returns:

List that contains traces that are

astropy.modeling.Model instance

Return type:

all_traces (list)

pipeline.core.core.write_fits(ccd, full_path, combined=False, parent_file=None, overwrite=True)

Write fits while adding information to the header.

This is a wrapper for allowing to save files while being able to add information into the header. Mostly for historical reasons.

Parameters:
  • ccd (object) – A CCDData instance to be saved to fits.
  • full_path (str) – Full path of file.
  • combined (bool) – True if ccd is the result of combining images.
  • parent_file (str) – Name of the file from which ccd originated. If combined is True this will be set to combined.
  • overwrite (bool) – Overwrite files, default True.
Returns:

CCDData instance.

Module contents