photonmap.Energy.CorrectEnergy

Functions

read_spectrum_file(filename, int, int)

Parse a spectrum file.

get_integral_of_band(→ float)

Returns the integral of the band as a percentage

get_correct_energy_coeff(base_spectral_range, ...)

Get the coefficients of energy's correction from the spectrum file

get_points_calibration(list_captor, ...)

Read the file which contains the points used for the calibration.

get_calibaration_coefficient(energies, ...)

Calculate the coefficients used to calibrate the result of simulation

calibrate_captor_energy(energies, correction_ratios, ...)

Calibrate the captor energy from photons to Mmol / m2 / s

calibrate_plant_energy(energies, coeffs_calibration)

Calibrate the plant energy from photons to Mmol / m2 / s

Module Contents

photonmap.Energy.CorrectEnergy.read_spectrum_file(filename: str)[source]

Parse a spectrum file.

Parameters

filename: str

The file to parse.

Returns

content: dict

A dictionary with wavelength as key and photon count as value.

step: int

the step in the dictionary between two entries.

start: int

the first wavelength in the file.

photonmap.Energy.CorrectEnergy.get_integral_of_band(base_band: range, divided_band: range, spectrum: dict) float[source]

Returns the integral of the band as a percentage

Parameters

base_band: range

The base spectral range which includes all the other spectral ranges

divided_band: range

The section of the base spectral range used to run the simulation

spectrum: dict

The whole spectrum of the band.

photonmap.Energy.CorrectEnergy.get_correct_energy_coeff(base_spectral_range, divided_spectral_range, spec_file: str)[source]

Get the coefficients of energy’s correction from the spectrum file

Parameters

base_spectral_range: range

The base spectral range which includes all the other spectral ranges

divided_spectral_range: range

The section of the base spectral range used to run the simulation

spec_file: str

The link to the file which contains the informations of the heterogeneity of the spectrum

Returns

integrals: array

The list of the coefficents of energy’s correction

photonmap.Energy.CorrectEnergy.get_points_calibration(list_captor, points_calibration_file, divided_spectral_range)[source]

Read the file which contains the points used for the calibration.

Parameters

captor_listarray

The list of captors

points_calibration_file: str

The link to the file which contains the informations of the captors used to calibrate the final result

divided_spectral_range: array

The list of spectral ranges divided from the base spectral range.

Returns

points_calibration: array

The list of the points used for the calibration

photonmap.Energy.CorrectEnergy.get_calibaration_coefficient(energies, correction_ratios, points_calibration)[source]

Calculate the coefficients used to calibrate the result of simulation

Parameters

energiesarray

The list of captor’s energies

correction_ratios: array

The list of the coefficents of energy’s correction

points_calibration: array

The list of the points used for the calibration

Returns

coeff_calibration: array

The list of coefficients used for the calibration

photonmap.Energy.CorrectEnergy.calibrate_captor_energy(energies, correction_ratios, points_calibration, coeffs_calibration)[source]

Calibrate the captor energy from photons to Mmol / m2 / s

Parameters

energiesarray

The list of captor’s energies

correction_ratios: array

The list of the coefficents of energy’s correction

points_calibration: array

The list of the points used for the calibration

coeffs_calibrationarray

The list of the coefficients used for the calibration

Returns

N_calibration: array

The list of captor’s energies after the calibration

photonmap.Energy.CorrectEnergy.calibrate_plant_energy(energies, coeffs_calibration)[source]

Calibrate the plant energy from photons to Mmol / m2 / s

Parameters

energiesarray

The list of captor’s energies

coeffs_calibrationarray

The list of the coefficients used for the calibration

Returns

N_calibration: array

The list of plant’s energies after the calibration