Utility functions (starclass.utilities)

Utility functions.

Code author: Rasmus Handberg <rasmush@phys.au.dk>

starclass.utilities.loadPickle(fname)[source]

Load an object from file using pickle.

Parameters
  • fname (string) – File name to save to. If the name ends in ‘.gz’ the file will be automatically unzipped.

  • obj (object) – Any pickalble object to be saved to file.

Returns

The unpickled object from the file.

Return type

object

starclass.utilities.rms_timescale(lc, timescale=0.041666666666666664)[source]

Compute robust RMS on specified timescale. Using MAD scaled to RMS.

Parameters
  • lc (lightkurve.TessLightCurve object) – Timeseries to calculate RMS for.

  • timescale (float, optional) – Timescale to bin timeseries before calculating RMS. Default=1 hour.

Returns

Robust RMS on specified timescale.

Return type

float

Code author: Rasmus Handberg <rasmush@phys.au.dk>

starclass.utilities.savePickle(fname, obj)[source]

Save an object to file using pickle.

Parameters
  • fname (string) – File name to save to. If the name ends in ‘.gz’ the file will be automatically gzipped.

  • obj (object) – Any pickalble object to be saved to file.

starclass.utilities.PICKLE_DEFAULT_PROTOCOL = 4

Default protocol to use for saving pickle files.

starclass.utilities.mad_to_sigma = 1.482602218505602

Conversion constant from MAD to Sigma. Constant is 1/norm.ppf(3/4)