mirar.processors.astromatic.swarp package

Module for interfacing with the SWarp software.

Submodules

mirar.processors.astromatic.swarp.component_images module

Module for getting the component images used to make a swarp stack

class mirar.processors.astromatic.swarp.component_images.ReloadSwarpComponentImages(load_image: ~collections.abc.Callable[[str], [<class 'mirar.data.image_data.Image'>]] = <function open_raw_image>, header_key='STCKCMPT', copy_header_keys: str | list[str] = None)[source]

Bases: BaseImageProcessor

Get the component images used to make a swarp stack

base_key = 'swarp_component_images'
check_prerequisites()[source]

Check to see if any prerequisite processors are missing

Returns:

None

description() str[source]

Return a description of the processor

Returns:

A description of the processor

mirar.processors.astromatic.swarp.swarp module

Module relating to `swarp <https://www.astromatic.net/software/swarp`_

class mirar.processors.astromatic.swarp.swarp.Swarp(swarp_config_path: str, temp_output_sub_dir: str = 'swarp', pixscale: float | None = None, x_imgpixsize: float | None = None, y_imgpixsize: float | None = None, propogate_headerlist: list | None = None, center_type: str | None = None, center_ra: float | None = None, center_dec: float | None = None, gain: float | None = None, include_scamp: bool = True, pass_clean_header: bool = False, combine: bool = True, cache: bool = False, subtract_bkg: bool = False, flux_scaling_factor: float = None, calculate_dims_in_swarp: bool = False, header_keys_to_combine: str | list[str] | None = None, coordinate_tolerance_deg: float = 10, min_required_coadds: int = 1)[source]

Bases: BaseImageProcessor

Processor to apply Swarp

base_key = 'swarp'
description() str[source]

Return a description of the processor

Returns:

A description of the processor

get_swarp_output_dir() Path[source]

Get custom output directory for swarp

Returns:

Swarp directory

exception mirar.processors.astromatic.swarp.swarp.SwarpError[source]

Bases: ProcessorError

Error relating to swarp

exception mirar.processors.astromatic.swarp.swarp.SwarpWarning[source]

Bases: UserWarning

Warning relating to swarp

exception mirar.processors.astromatic.swarp.swarp.TooFewCoaddsErrors[source]

Bases: ProcessorError

Error for when too few coadds are present

mirar.processors.astromatic.swarp.swarp_wrapper module

Wrapper function to interface with Swarp

mirar.processors.astromatic.swarp.swarp_wrapper.run_swarp(stack_list_path: str | Path, swarp_config_path: str | Path, out_path: str | Path, weight_list_path: str | Path | None = None, weight_out_path: str | Path | None = None, pixscale: float | None = None, x_imgpixsize: float | None = None, y_imgpixsize: float | None = None, propogate_headerlist: list | None = None, center_ra: float | None = None, center_dec: float | None = None, combine: bool = True, gain: float | None = None, subtract_bkg: bool = False, flux_scaling_keyword: str = None, cache: bool = False, center_type: str = None)[source]

Wrapper to resample and stack images with swarp

Parameters

stack_list_pathstring

Name of file containing the names of files to be stacked One file name per line

weight_list_pathstring

Name of file containing the names of weight files to be stacked One file name per line

swarp_config_path: str

Path of Swarp config file

out_pathstring

Path of stacked output file

weight_out_path: str

Path of output weight image

pixscale: float

Pixelscale in degrees

x_imgpixsize: float

X-dimension in pixels

y_imgpixsize: float

Y-dimension in pixels

propogate_headerlist: list

Headerlist to propagate from header

center_ra: float

Central RA

center_dec: float

Central Dec

combine: bool

Combine and coadd all images? For reasons internal to Swarp, it is strongly advised to always set this to True (even if you are running Swarp on only one image).

gain: float

Gain

subtract_bkg: bool

Background subtraction

flux_scaling_keyword: str

What flux scaling keyword do you want to use? If None, the default value in the config will be used