isofit.core.isofit

class Isofit(config_file, row_column='', level='INFO', logfile=None)[source]

Bases: object

Initialize the Isofit class.

Parameters:
  • config_file – isofit configuration file in JSON or YAML format
  • row_column

    The user can specify

    • a single number, in which case it is interpreted as a row
    • a comma-separated pair, in which case it is interpreted as a row/column tuple (i.e. a single spectrum)
    • a comma-separated quartet, in which case it is interpreted as a row, column range in the order (line_start, line_end, sample_start, sample_end) all values are inclusive.

    If none of the above, the whole cube will be analyzed.

  • level – logging level (ERROR, WARNING, INFO, DEBUG)
  • logfile – file to write output logs to
run()[source]

Iterate over all spectra, reading and writing through the IO object to handle formatting, buffering, and deferred write-to-file. The idea is to avoid reading the entire file into memory, or hitting the physical disk too often. These are our main class variables.