File Formats
LIME Toolbox reads various types of data from netCDF files, each following a specific format. These formats adhere as closely as possible to the GSICS Lunar Observation Dataset (GLOD) format standards.
Spectral Response Function (SRF)
Spectral Response Function files are structured with two dimensions:
channel
: A coordinate and dimension, where each value represents a different spectral channel.sample
: A dimension without coordinates, which allows multiple wavelengths to be associated with each channel.(This dimension may have different names depending on the dataset.)
These dimensions organise the mandatory data variables described in Table 2.
Variable |
Dimensions |
dtype |
Description |
---|---|---|---|
|
|
str |
Name of the channel |
|
|
float |
Wavelengths present in each channel |
|
|
float |
Spectral response of each wavelength per channel |
Table 2: Mandatory variables of the Spectral Response Function netCDF file format.
Note: The variable wavelength
must contain the attribute units
, which value must be the
variable unit symbol by the IS. For example, “nm”.
Lunar Observation
Lunar Observation files format is a subset of the GLOD format for lunar observations. It’s structured using three dimensions:
date
: A coordinate and dimension representing the time of the lunar observation.Stored as a double precision float. Units: seconds since EPOCH.
chan
: A dimension without coordinates, where each value represents a different spectral channel.sat_xyz
: A dimension without coordinates, representing the three spatial coordinates (x, y, z).This dimension must have a fixed length of three.
These dimensions structure the required data variables outlined in Table 3.
Variable |
Dimensions |
dtype |
Description |
---|---|---|---|
|
|
str |
Name of the spectral channel |
|
|
float |
Observed lunar irradiance per spectral channel |
|
|
float |
Coordinates of the observer in |
|
None |
str |
Reference frame of the satellite position |
Table 3: Mandatory variables of the Lunar Observation netCDF file format.
Note: The variable sat_pos
must contain the attribute units
, which value must be the
variable unit symbol by the IS. For example, “km”.
In addition to these variables, the file must include the attribute:
data_source
: Specifies the origin of the observation data.
Lunar Observation Format Extension
Lunar Observation files should follow the subset of the GLOD format previously described.
However, if the sat_pos
variable is not available, LIME Toolbox will instead look for selenographic coordinates.
In this case, the selenographic variables must follow the schema in Table 4, where all variables must
have date
as their dimension.
Variable Name |
Mandatory |
Description |
---|---|---|
|
Yes |
Distance between the Sun and the Moon (AU) |
|
Yes |
Selenographic longitude of the Sun (radians) |
|
Yes |
Distance between the satellite and the Moon (km) |
|
Yes |
Selenographic longitude of the satellite (degrees) |
|
Yes |
Selenographic latitude of the satellite (degrees) |
|
Yes |
Moon phase angle (degrees) |
|
No |
Satellite name (used for handling missing data) |
|
No |
Geometric constant used to normalize observed irradiance |
Table 4: Data variables in the Lunar Observation netCDF file format representing selenographic coordinates.
Understanding geom_factor
The geom_factor
(or geom_const
) represents the geometric constant used in irradiance normalization.
If a given, the toolbox will use this value to normalize its simulated irradiance.
normalised_irr = irr/geom_factor
Handling Missing Data
If any mandatory variable is missing, LIME Toolbox will automatically compute them using:
SPICE library → Computes
distance_sun_moon
andsun_sel_lon
.SPICE + EO-CFI libraries → Compute
distance_sat_moon
,sat_sel_lon
,sat_sel_lat
, andphase_angle
.For these four latter variables, LIME Toolbox requires the satellite name (
sat_name
),It must be a string and must match a satellite in the LIME Toolbox satellite list.
Optional Attribute: to_correct_distance
If present with a value of
1
, LIME Toolbox will normalise the observation’sirr_obs
value using the observation’s distances.This is useful when the irradiance is not pre-normalized.
LIME Toolbox Simulations and Comparisons
LIME Toolbox allows exporting simulations and comparisons to netCDF format files, which can be reloaded within the toolbox for future visualization and analysis.
These files follow a structure similar to Lunar Observation files but contain multiple observation timestamps instead of just one. Additionally, they include more detailed data such as simulated irradiance, reflectance, and spectral values.
Both simulation and comparison files share a similar format but with distinct differences. This format is referred to as the LIME Toolbox netCDF format, previously known in documentation as LIME-GLOD (LGLOD) format.
File Attributes
LIME Toolbox netCDF format files include multiple attributes based on the GLOD format. The key attributes are:
data_source: Indicates the origin of the data (LIME Toolbox).
reference_model: Specifies the LIME coefficient version used.
not_default_srf:
0
: Default LIME Toolbox SRF was used.1
: A user-defined custom SRF was used.
spectrum_name: Name of the spectrum used for reflectance interpolation.
is_comparison:
0
: Indicates a simulation file.1
: Indicates a comparison file.
skipped_uncertainties:
0
: Uncertainty computations were performed.1
: Uncertainty computations were skipped.
polarisation_spectrum_name: Name of the spectrum used in polarization interpolation (only present in simulation files).
File Dimensions
All LIME Toolbox netCDF files are structured using four core dimensions:
chan: Number of spectral channels in the data.
date: Number of timestamps present.
number_obs: Number of observation positions where simulations exist for at least one channel.
sat_xyz: Fixed length of
3
, representing the(x, y, z)
coordinates of the satellite.
Simulations files contain two additional dimensions:
wlens: Fixed length of
2151
, representing the number of wavelengths in full-spectrum simulations.wlens_cimel: Fixed length of
6
, representing the number of CIMEL wavelengths.
File Variables
Common Data Variables
LIME Toolbox netCDF files share several core variables based on the GLOD format, described in Table 5.
Variable |
Dimensions |
dtype |
Description |
---|---|---|---|
|
|
float64 |
Time of lunar observation, seconds since epoch. |
|
|
int8 |
1 if the observation is outside the Moon phase angle valid range, 0 if inside. |
|
|
float64 |
Moon phase angle in degrees. |
|
|
str |
Channel/Sensor band identifier. |
|
|
float64 |
Satellite position in (x, y, z) coordinates for |
|
|
str |
Reference frame of the satellite position. |
|
None |
str |
Name of the satellite (or empty if it wasn’t a satellite measure). |
|
|
float64 |
Simulated integrated lunar irradiance for each channel. |
|
|
float64 |
Uncertainties of the simulated integrated lunar irradiance for each channel. |
Table 5: Common data variables in all LIME Toolbox netCDF files.
Comparison Specific Variables
Comparison files contain additional variables that store observed and computed differences, detailed in Table 6.
Variable |
Dimensions |
dtype |
Description |
---|---|---|---|
|
|
float64 |
Integrated lunar irradiance for each channel observed with the instrument, obtained from the user defined observation files. |
|
|
float64 |
Uncertainties of the integrated lunar irradiance for each channel observed with the instrument, obtained from the user defined observation files. |
|
|
float64 |
Lunar irradiance comparison difference for each channel. |
|
|
float64 |
Uncertainties of the lunar irradiance comparison difference for each channel. |
|
|
float64 |
Percentage difference in the lunar irradiance comparison for each channel. |
|
|
float64 |
Uncertainties of the percentage difference in the lunar irradiance comparison for each channel. |
|
|
float64 |
Mean relative difference. |
|
|
float64 |
Mean absolute relative difference. |
|
|
float64 |
Mean percentage difference. |
|
|
float64 |
Standard deviation of the mean relative difference. |
|
|
float64 |
Number of comparisons for each channel. |
Table 6: Data variables in LIME Toolbox Comparison netCDF files.
Simulation Specific Variables
Simulation files contain additional variables that store spectral data, described in Table 7.
Variable |
Dimensions |
dtype |
Description |
---|---|---|---|
|
|
float64 |
Wavelengths for |
|
|
float64 |
Simulated lunar irradiance per wavelength. |
|
|
float64 |
Uncertainties for the simulated lunar irradiance per wavelength. |
|
|
float64 |
Simulated lunar reflectance per wavelength. |
|
|
float64 |
Uncertainties for the simulated lunar reflectance per wavelength. |
|
|
float64 |
Simulated lunar degree of polarization per wavelength. |
|
|
float64 |
Uncertainties for the simulated lunar degree of polarization per wavelength. |
|
|
float64 |
CIMEL wavelengths. |
|
|
float64 |
Simulated lunar irradiance for the CIMEL wavelengths. |
|
|
float64 |
Uncertainties for the simulated lunar irradiance for the CIMEL wavelengths. |
|
|
float64 |
Simulated lunar reflectance for the CIMEL wavelengths. |
|
|
float64 |
Uncertainties for the simulated lunar reflectance for the CIMEL wavelengths. |
|
|
float64 |
Simulated lunar degree of polarization for the CIMEL wavelengths. |
|
|
float64 |
Uncertainties for the simulated lunar degree of polarization for the CIMEL wavelengths. |
Table 7: Data variables in LIME Toolbox Simulation netCDF files.