SuperDARN / rst

Radar Software Toolkit (RST)
https://superdarn.github.io/rst/
GNU General Public License v3.0
21 stars 16 forks source link

Modifying RadarParmDecode to set ifmode to zero by default #594

Closed egthomas closed 3 weeks ago

egthomas commented 9 months ago

This pull request addresses an inconsistency identified by Sessai, where currently the RadarParmDecode function sets the ifmode field to -1 if the field is not present, eg for files written by QNX4-era (or earlier) radars. This pull request modifies the behavior such that the ifmode field is always set to zero (0) by default (which matches our documentation).

To test, you can try something like this:

make_fit -fitacf2 20230129.0616.03.sys.rawacf > 20230129.0616.03.sys.fitacf
dmapdump 20230129.0616.03.sys.fitacf > 20230129.0616.03.sys.fitacf.dump
grep -r "ifmode" 20230129.0616.03.sys.fitacf.dump | tail -1

On this branch, the ifmode field in the radar parameter block should be 0, while on develop it will be -1. No other functionality has changed.

ksterne commented 3 weeks ago

This works as described. I guess there's a wonder on how this impacts all of the fit-level data that's already generated. But it seems like this is more user specific request, so they can reprocess the fit-level data.