edges.cal.thermistor

Functions for working with data from a thermistor.

class edges.cal.thermistor.ThermistorReadings(data: QTable)[source]

Object containing thermistor readings.

Parameters:

data (astropy.table.table.QTable) – The data array containing the readings.

classmethod from_csv(path: str | Path, ignore_times: int | Annotated[Quantity, Unit('%')] | Annotated[Quantity, Unit('s')] = 0) Self[source]

Generate the object from an io.Resistance object.

classmethod from_file(path: str | Path | Group)

Load an HDF5 file as a given type.

get_physical_temperature() Annotated[Quantity, PhysicalType('temperature')][source]

The associated thermistor temperature in K.

get_thermistor_indices(timestamps: Time) list[int | None][source]

Get the index of the closest therm measurement for each spectrum.

ignore_times(ignore_times: int | Annotated[Quantity, Unit('%')] | Annotated[Quantity, Unit('s')])[source]

Number of time integrations to ignore from the start of the observation.

write(path: str | Path | Group)

Write an attrs class to HDF5.

edges.cal.thermistor.get_temperature_thermistor(resistance: Annotated[Quantity, Unit('Ohm')], coeffs: str | Sequence[float] = 'oven_industries_TR136_170') Annotated[Quantity, PhysicalType('temperature')][source]

Convert resistance of a thermistor to temperature.

Uses a pre-defined set of standard coefficients.

Parameters:
  • resistance

  • coeffs (str or len-3 iterable of floats, optional) – If str, should be an identifier of a standard set of coefficients, otherwise, should specify the coefficients.

Returns:

temperature – The temperature for each resistance given.

edges.cal.thermistor.ignore_ntimes(times: Time, ignore_times: int | Annotated[Quantity, Unit('%')] | Annotated[Quantity, Unit('s')]) int[source]

Number of time integrations to ignore from the start of the observation.

edges.cal.thermistor.voltage_to_resistance(voltage: Annotated[Quantity, PhysicalType('electrical potential')], load_resistance: Annotated[Quantity, Unit('Ohm')]) Annotated[Quantity, Unit('Ohm')][source]

Convert thermistor voltage reading to resistance.

Parameters:
  • voltage – The voltage reading from the thermistor circuit.

  • load_resistance – The resistance of the load resistor in series with the thermistor.

Returns:

resistance – The resistance of the thermistor.