Diagnostics

nustar_gen.diagnostic.goes_lightcurve(obs, show_sun=False, show_sky=False, show_impact=True)

Module for producing a GOES lightcurve and the NuSTAR in/out of Sun times

Parameters:
  • obs (Class) – Output from nustar_gen.info.Observation() class

  • show_sun (bool) – Show just the Sun period (default is False)

  • show_sky (bool) – Show the unocculted periods (default is false)

  • show_impact (bool) – Show the periods where you are in Sun and the source is unocculted. Default is True Note that setting either show_sun or show_sky prevents show_impact

Return type:

None

nustar_gen.diagnostic.compare_sun_spec(obs, mod='A', src_rad=<Quantity 2. arcmin>, en_range=(3, 20), en_bins=34, ratio=False)

Uses the attorb file to generate a spectrum when NuSTAR is in/out of sunlight to check for solar activity.

Parameters:
  • obs (Class) – Output from nustar_gen.info.Observation() class

  • mod (str) – Which module, should ‘A’ or ‘B’. Default is ‘A’

  • src_rad (astropy unit) – Radius to throw away source counts. Default is 2-arcmin

  • en_range (list) – Energy range to use. Default is (3, 20).

  • en_bins (int) – Number of bins to use for histogram (default is 34)

  • ratio (bool) – Whether to plot the spectra or their ratio. Default is False.

Return type:

None