Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Partial loading in storage2cache()? #27

Open
jmmelko opened this issue Nov 5, 2021 · 1 comment
Open

[FEATURE REQUEST] Partial loading in storage2cache()? #27

jmmelko opened this issue Nov 5, 2021 · 1 comment

Comments

@jmmelko
Copy link

jmmelko commented Nov 5, 2021

Hi,

HAPI is great, but not for offline usage.

Because, using it offline you would want to work with a exhaustive .par file, but only request lines within a certain wavenumber range.

The problem is that, as far as I understand, the storage2cache() method loads the entire .par file.

(btw, the pos=None parameter is not even used in this method, so you could at least add

if pos:
    for i in range(0, min([pos, line_count])):
        InfileData.readline())

)

A lot of time would be saved by loading only lines within a certain wavenumber range (except maybe when the seeked range is at the end of the .par file).

I am not sure it is possible with the current code as it is, because lines are all read as strings, and then converted to numbers.

For this reason, I continue to use our former matlab code which is faster because it has this functionality, which is sad because I like Python better.

Am I the only one to needthis functionality?

tx

@jmmelko jmmelko changed the title Partial loading of storage in cache [FEATURE REQUEST] Partial loading in storage2cache()? Nov 5, 2021
@erwanp
Copy link

erwanp commented Nov 5, 2021

I think HAPI2 will include HDF5 support ; it would become very easy to only select specific waveranges.

If it can help : to improve performances in RADIS, we benchmarked a few HDF5 librairies to handle large line databases; and I'd definitly suggest to give a try to Vaex which proved extremelly efficient in our case (2nd link below) :

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants