You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Save N latest computed spectra to improve performances when computing the same one twice
The SpectrumFactory (machinery behind calc_spectrum) can be connected to a SpecDatabase, which is really only a local folder, to automatically retrieve a Spectrum if it's already there; and store it if it's not.
This is not implemented at the calc_spectrum level, but it could be done quite easily (already asked for a few years ago in radis/radis#135 ). The api would be something like :
s=calc_spectrum(..., local_folder="~/radis_spectra") # automatically retrieve spectra if needed, computes and stores then if not
Advantages :
similarities & tests are kept at the Radis backend level; we're sure Radis-App is not mistakently returning a different spectrum it thoughts was the same
Radis has HDF5 read/write of spectra, so ready/writing will be almost instantaneous (if we're smart in the computation conditions ; retrieving a spectrum on a narrower spectrum than the one already computed would work too )
no need to change much in Radis-app
we'd probably only have to add a feature to keep only the N latest spectra ; or clean the cache periodically.
Save N latest computed spectra to improve performances when computing the same one twice
The
SpectrumFactory
(machinery behindcalc_spectrum
) can be connected to aSpecDatabase
, which is really only a local folder, to automatically retrieve a Spectrum if it's already there; and store it if it's not.This is not implemented at the
calc_spectrum
level, but it could be done quite easily (already asked for a few years ago in radis/radis#135 ). The api would be something like :Advantages :
Originally posted by @erwanp in #619 (comment)
The text was updated successfully, but these errors were encountered: