fit_iris_xput

irispy.utils.fit_iris_xput(time_obs, time_cal_coeffs, cal_coeffs)[source]

To calculate the coefficients of best-fit time function for throughput, for which there are two modes: 1. Perform fit: supply xput and single element cal_coeffs. 2. Apply fit: supply full cal_coeffs.

The procedure involved in this function is as follows: 1. The time difference (in years) is computed from the time_obs and time_cal_coeffs. 2. A least-squares fit is performed to determine the best fit for the time-dependent effective areas given the time difference.

Parameters:
  • time_obs (list) – A list of observation times as astropy.time.Time objects.

  • time_cal_coeffs (astropy.time.Time with) – Start and end times of intervals of constant cal_coeffs[i]. These should be in “utime” format. a numpy array of floats (with exactly two columns)

  • cal_coeffs (a numpy array of floats (with at least two columns)) – Coefficients of best-fit function.

Returns:

Yields the fit used to compute the effective area using the input times time_obs.

Return type:

numpy.array