module documentation
Script that deconvolves the first argument with the second argument
- Example invocation:
python -m aopp_deconv_tool.deconvolve './example_data/test_rebin.fits{DATA}[10:12]{CELESTIAL:(1,2)}' './example_data/fit_example_psf_000.fits[10:12]{CELESTIAL:(1,2)}'
Class |
|
Undocumented |
Class |
|
Undocumented |
Function | create |
Creates a set of plots that are updated every cadence steps. Useful to see exactly what a deconvolver is doing. |
Function | deconv |
Undocumented |
Function | display |
Undocumented |
Function | exec |
Undocumented |
Function | go |
Thin wrapper around run() to accept string inputs. As long as the names of the arguments to this function are the same as the names expected from the command line we can do this programatically |
Function | init |
Undocumented |
Function | parse |
Undocumented |
Function | run |
Given a FitsSpecifier for an observation and a PSF, an output path, and a class that performs deconvolution, deconvolves the observation using the PSF. |
Variable | deconv |
Undocumented |
Variable | _lgr |
Undocumented |
Creates a set of plots that are updated every cadence
steps. Useful to see exactly what a deconvolver is doing.
def go(obs_fits_spec, psf_fits_spec, output_path=None, plot=None, deconv_method=None, deconv_method_help_FLAG=None, n_processes=None, **kwargs):
¶
Thin wrapper around run()
to accept string inputs.
As long as the names of the arguments to this function
are the same as the names expected from the command line
we can do this programatically
def run(obs_fits_spec:
aph.fits.specifier.FitsSpecifier
, psf_fits_spec: aph.fits.specifier.FitsSpecifier
, deconvolver: Literal[ CleanModified] | Literal[ LucyRichardson]
, output_path: str | Path
= './deconv.fits', plot: bool
= True, progress: int
= 0, n_processes: int
= mp.cpu_count() - 2):
¶
Given a FitsSpecifier for an observation and a PSF, an output path, and a class that performs deconvolution, deconvolves the observation using the PSF.
- # ARGUMENTS #
- obs_fits_spec : aph.fits.specifier.FitsSpecifier
FITS file specifier for observation data, format is PATH{EXT}[SLICE](AXES). Where:
- PATH : str
- The path to the FITS file
- EXT : str | int
- The name or number of the FITS extension (defaults to PRIMARY)
- SLICE : "python slice format" (i.e., [1:5, 5:10:2])
- Slice of the FITS extension data to use (defaults to all data)
- AXES : tuple[int,...]
- Axes of the FITS extension that are "spatial" or "celestial" (i.e., RA, DEC), by default will try to infer them from the FITS extension header.
- psf_fits_spec : aph.fits.specifier.FitsSpecifier
- FITS file specifier for PSF data, format is same as above
- output_path : str = './deconv.fits'
- Path to output deconvolution to.
- deconvolver : ClassInstance
- Instance of Class to use for deconvolving, defaults to an instance of CleanModified
- plot : bool = True
- If
True
will plot the deconvolution progress - n_processes : int = N_cpu - 2
- Number of processes to parallelise the calculations over