StingraySoftware / stingray

Anything can happen in the next half hour (including spectral timing made easy)!
https://stingray.science/stingray
MIT License
172 stars 141 forks source link

Some functionality fails with memory mapped input #823

Closed matteobachetti closed 5 months ago

matteobachetti commented 5 months ago

Description of the Bug

We often have calls to np.asarray in the code, which make an immediate copy into memory even if the input array is a memory mapped array

Steps/Code to Replicate the Bug

On Linux (which has a pretty rigid management of RAM) generate_indices_of_segment_boundaries_unbinned fails when the input file is a memory map larger than the RAM

Expected Results

It should work.

Actual Results

It doesn't