image_setup

esis.data.inversion.mart.helper.image_setup(fits_file, x_range, y_range, saa_x_ranges, saa_y_ranges, border=20, rebin_factor=6, wavelength_rebin_factor=2, roy_smart_rebin_error=6, cval=1)

Sets up an image for use in MART from a given FITS file. Assumes image has a WCS and is a spatial (xy) and spectral image (in last axis). This is a very brittle program.

Parameters
  • roy_rebin_error – Roy, when writing down the SAA regions, apparently introduced a factor of 6 error. Incoming y-values for SAA regions needed to be multiplied by 6 to be correctly applied to the raw data (not reshaped or rebinned) from the FITS file.

  • fits_file (pathlib.Path) – fits file to use

  • x_range (typing.Tuple[int, int]) – (x_min, x_max) range to be used in the image.

  • y_range (typing.Tuple[int, int]) – (y_min, y_max) range to be used in the image.

  • border (int) – How much cushion for rotations?

  • saa_x_ranges (List[Tuple[int, int]]) –

  • saa_y_ranges (List[Tuple[int, int]]) –

  • rebin_factor (int) –

  • wavelength_rebin_factor (int) –

  • roy_smart_rebin_error (int) –

Return type

typing.Tuple[numpy.ndarray, numpy.ndarray]

Returns