Skip to content

Optimize NVSPL file reading#93

Open
arpitjain099 wants to merge 1 commit into
dbetchkal:mainfrom
arpitjain099:perf/nvspl-read-optimization
Open

Optimize NVSPL file reading#93
arpitjain099 wants to merge 1 commit into
dbetchkal:mainfrom
arpitjain099:perf/nvspl-read-optimization

Conversation

@arpitjain099

Copy link
Copy Markdown
Contributor

Addresses the TODO at models.py line 185 about speed and memory improvements for NVSPL parsing.

Three changes in Nvspl._read():

  1. The float32 coercion on line 172 was silently discarded. The pandas astype() method returns a new DataFrame but the result was never assigned back, so the conversion never took effect. Fixed by assigning the result.

  2. Added a dtype dict so numeric columns are read as float32 from the start instead of the default float64. For a typical multi-month deployment reading thousands of hourly NVSPL files (each 3600 rows x 54 columns), this cuts memory usage on numeric data roughly in half.

  3. Drops columns that are consistently empty in standard NVSPL output (INVID, INSID, GChar2, AdjustmentsApplied, CalibrationAdjustment, GPSTimeAdjustment). Downstream code only accesses the octave bands, broadband levels, and the datetime index, so these empty columns just waste memory.

…columns

Signed-off-by: arpitjain099 <arpitjain099@gmail.com>
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

Successfully merging this pull request may close these issues.

1 participant