PSFMatchingStep

This step will convolve mosaics to a common resolution. You’ll need to supply the convolution kernels, but this will do the rest.

If you want to generate a kernel that can feed directly into this step, please see this repository.

API

class pjpipe.PSFMatchingStep(target, in_dir, out_dir, kernel_dir, procs, in_step_ext, band=None, target_bands=None, reproject_func='interp', overwrite=False, skip_if_missing_kernels=False)[source]

Match PSF for all images

Taking a list of target resolutions and kernels, will convolve to those resolutions. If an existing file already exists (e.g. a F2100W image from processing), will also regrid to that pixel grid

Parameters:
  • target – Target to consider

  • in_dir – Input directory

  • out_dir – Output directory

  • kernel_dir – Kernel directory

  • procs – Number of processes to run in parallel

  • in_step_ext – Filename extension for the input files

  • band – Bands to consider

  • target_bands – Bands to convolve to

  • reproject_func – Which reproject function to use. Defaults to ‘interp’, but can also be ‘exact’ or ‘adaptive’

  • overwrite – Whether to overwrite or not

  • skip_if_missing_kernels – Whether to skip if kernels are missing

do_step()[source]

Run psf_matching step

parallel_psf_match(current_task, current_band=None)[source]

Parallelize psf matching to target resolution

Parameters:
  • current_task – tuple (file, target_band), where file is the File to apply psf matching, and target_band is the band of target resolution

  • current_band – band of the current image

Returns:

True or False

run_step(files, procs=1)[source]

Wrap paralellism around applying psf matching

Parameters:
  • files – List of files to process

  • procs – Number of parallel processes to run. Defaults to 1