PipelineImage

class phrosty.pipeline.PipelineImage(image, pipeline)[source]

Bases: object

Holds a snappl.image.Image, with some other stuff the pipeline needs.

Create a PipelineImage

Parameters:

imagesnappl.image.Image

The image we’re encapsulating. Pass either this or imagepath.

pipelinephrosty.pipeline.Pipeline

The pipeline that owns this image.

Methods Summary

free([free_psf_data])

Try to free memory.

get_psf(ra, dec)

Get the at the right spot on the image.

keep_psf_data(psf_data)

Save PSF data to attribute.

run_sky_subtract([mp])

Run sky subtraction using Source Extractor.

save_sky_subtract_info(info)

Saves the sky-subtracted image, detection mask array, and sky RMS values to attributes.

Methods Documentation

free(free_psf_data=False)[source]

Try to free memory. More might be done here.

get_psf(ra, dec)[source]

Get the at the right spot on the image.

Parameters:
  • ra (float) – The coordinates in decimal degrees where we want the PSF.

  • dec (float) – The coordinates in decimal degrees where we want the PSF.

Returns:

PSF stamp. If this function fails, None is returned.

Return type:

np.array

keep_psf_data(psf_data)[source]

Save PSF data to attribute.

Parameters:

psf_data (np.array) – PSF stamp.

run_sky_subtract(mp=True)[source]

Run sky subtraction using Source Extractor.

Parameters:

mp (bool, optional) – Toggle multiprocessing, by default True

Returns:

Tuple containing sky subtracted image, detection mask array, and sky RMS value. Output of phrosty.imagesubtraction.sky_subtract().

Return type:

tuple

save_sky_subtract_info(info)[source]

Saves the sky-subtracted image, detection mask array, and sky RMS values to attributes.

Parameters:

info (tuple) – Output of self.run_sky_subtract(). See documentation for phrosty.imagesubtraction.sky_subtract().