isofit.utils.interpolate_spectra

Classes

Worker

Functions

interpolate_spectra(infile[, outfile, inplace, ...])

Interpolate wavelength bands that are either no data or Nan.

cli(**kwargs)

Module Contents

class Worker(infile, outfile, inplace, nodata_value, logfile, loglevel)[source]

Bases: object

infile[source]
inplace[source]
nodata_value[source]
in_img[source]
wl[source]
interpolate_values(meas, replace_nan=False)[source]
interpolate_chunk(startstop)[source]
interpolate_spectra(infile: str, outfile: str = '', inplace: bool = False, nodata_value: float = -9999.0, n_cores: int = -1, ray_address: str = None, ray_redis_password: str = None, ray_temp_dir: str = None, ray_ip_head=None, task_inflation_factor: int = 1, logfile: str = None, loglevel: str = 'INFO')[source]

Interpolate wavelength bands that are either no data or Nan. The interpolation will only be applied to pixel-vectors that include partial NaNs. This is meant to be used if the number of wavelengths missing is minor, and has not been widely tested if a large number of wavelength vlues are missing.

The interpolation will do two checks. One for “nodata values,” the other for NaN values. Motivated by some sensor products which have rdn data with both no data, and NaN values.

 :param infile: Input file that contains the wavelengths to be interpolated. :type infile: str :param inplace: Flag to tell algorithm to write to new file (False) or write to

input file (True)

Parameters:
  • outfile (str) – Output lcoation for the interpolated wavelengths

  • nodata_value (float) – No data value to check against, and interpolate across Flexible typing in numpy boolean operations means this could be float or int

  • n_cores (int) – Number of cores to run. Substantial parallelism is available Defaults to maxing this out on the available system (-1)

  • logfile (str) – File path to write logs to

  • loglevel (str) – Logging level with which to run ISOFIT

cli(**kwargs)[source]