EUVpy.NEUVAC.neuvac module¶
- EUVpy.NEUVAC.neuvac.aetherFile(tableFile: str = '/home/docs/checkouts/readthedocs.org/user_builds/euvpy/envs/latest/lib/python3.11/site-packages/EUVpy/data/neuvac_table.txt')[source]¶
Take the NEUVAC coefficients in the 59 wavelength bins and put them into a .csv file in a format for use by the Aether model.
- Parameters:
tableFile (str) – The location of the NEUVAC table file to convert. Default is the 59-bin table file in the EUVpy repo. Default location is EUVpy/Src/EUVpy/data/.
- Returns:
outfile – The location of the .csv file for use by the Aether.
- Return type:
str
- EUVpy.NEUVAC.neuvac.gitmNEUVAC(f107times, f107, f107b)[source]¶
Write NEUVAC irradiances to a file for ingestion directly into the Global Ionosphere-Thermosphere Model. This code writes the data to 59 wavelength bins.
- Parameters:
f107times (arraylike) – The timestamps for F10.7 values. Individual values must be datetimes.
f107 (arraylike) – The F10.7 values. Individual values must be floats.
f107b (arraylike) – The F10.7 values averaged in a 54-day backwards-looking window. Individual values must be floats.
- Returns:
outfile – The name of the output file.
- Return type:
string
- EUVpy.NEUVAC.neuvac.irrFunc(F107input, A, B, C, D, E, F)[source]¶
Parametric formula used to model solar irradiance a given wavelength band as a function of F10.7 and F10.7A.
- Parameters:
F107input (list) – Contains two elements. The first element is F10.7 data. The second element is F10.7A data (81-day averaged F10.7 data, centered on the current day). The second element must be the same length as the first. For the operational version of NEUVAC, the second element should correspond to 54-day averaged F10.7 data in a backwards-looking window.
A (float) – The first model coefficient.
B (float) – The exponent of the first model term.
C (float) – The second model coefficient.
D (float) – The exponent of the second model term.
E (float) – The third model coefficient.
F (float) – The intercept term.
- Returns:
irradiance – The solar irradiance in a given wavelength band, in units of either W/m^2/nm or W/m^2.
- Return type:
arraylike
- EUVpy.NEUVAC.neuvac.neuvacEUV(f107, f107a, bands=None, tableFile=None, statsFiles=None)[source]¶
Use a parametric model to compute solar flux in the 59 conventional wavelength bands used by Aether/GITM. Capable of returning perturbed irradiance values that are perturbed according to the variations of in the intensity of each bin. Uses Eq. 4 from Brandt and Ridley, 2025 (doi:10.1029/2024SW004043).
- Parameters:
f107 (numpy.ndarray) – F10.7 values.
f107a (numpy.ndarray) – 81-day center-averaged F10.7 values; must be the same length as f107.
bands (str) – If None or ‘NEUVAC’, returns irradiances in the GITM Bands. If ‘EUVAC’, returns them in the 37 bands used by EUVAC. If ‘SOLOMON’, returns them in the 22 bands used by Solomon and Qian. Default is None.
tableFile (str) – Corresponds to the .txt file holding the NEUVAC coefficients most recently-generated by fitNeuvac.py. If not given, simply uses the table file corresponding to the selected bin structure. Default is None.
statsFiles (list) – A 2 element list where the first element is a file containing the 59x59 correlation matrix and the second element is a file containing the 1x59 standard deviation values for NEUVAC. Not required. Default is None.
euvIrradiance (numpy.ndarray) – A nxm ndarray where n is the number of EUV irradiance values and m is the number of wavelength bands.
- Returns:
perturbedEuvIrradiance (ndarray) – A nxm ndarray where n is the number of EUV irradiance values perturbed due to inherent uncertainty and m is the number of wavelength bands.
savedPerts (ndarray) – A nxm ndarray of the perturbations (time series of the NEUVAC+Perturbation - NEUVAC)
cc2 (numpy.ndarray) – A mxm ndarray of the correlation matrix between each wavelength’s time-series of the NEUVAC+Perturbation - NEUVAC.
- EUVpy.NEUVAC.neuvac.neuvacFit(f107Data, irrTimes, irrData, wavelengths, label=None, constrain=False)[source]¶
Calculate entirely new empirical parametric fits between F10.7 data and solar EUV irradiance data, irrespective of the number of wavelength bands the irradiance data is split into.
- Parameters:
f107Data (list) – A list where the first element is an arraylike of datetimes for each F10.7 value, the second element is an arraylike of F10.7 values, and the third element is an arraylike of centered running 81-day averaged F10.7 values.
irrTimes (arraylike) – An arraylike of datetimes for each solar EUV spectra in irrData.
irrData (numpy.ndarray) – An array of solar EUV irradiance measurements or estimates (from FISM, TIMED/SEE, etc.), arranged such that there is a single observation per row. A single observaton contains the entire EUV spectrum for a single day.
wavelengths (arraylike) – An array of wavelengths to which the irradiance data corresponds.
label (None) – An optional argument specifying the label for the data the model is being constructed for. Default is None.
constraint (bool) – An optional argument that if True, constrains the fitted function to yield nonnegative outputs.
- Returns:
fitParams – An array of coefficients with which to compute the irradiance in each bin.
- Return type:
numpy.ndarray