lwa-project / orville_wideband_imager

The Orville Wideband Imager
https://leo.phys.unm.edu/~lwa/lwatv2.html
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Add read_all method #27

Closed lcordonnier closed 5 months ago

lcordonnier commented 5 months ago

I've added a read_all method to OrvilleImageDB.py which reads in all integrations at once and returns the headers in a list of dicts and the data in a 5d masked float32 array. Changing the masking process and array dtypes sped up the process about 3-4 times compared to the original iterative technique.

jaycedowell commented 5 months ago

I changed:

data = numpy.ma.masked_array(data, reshaped_mask, dtype=numpy.float32)

to

data = numpy.ma.masked_array(data, reshaped_mask, dtype=data.dtype)

to retain the original dtype of data. Does that kill the performance?

lcordonnier commented 5 months ago

Performance is unaffected.