nanograv / pint_pal

A long-lived repository for NANOGrav Pulsar Timing workflows and analysis.
MIT License
6 stars 16 forks source link

reflagger program rewrite #16

Closed cuantar closed 1 month ago

cuantar commented 1 year ago

Here is my rewrite of the re-flagger program. Its behavior differs slightly from the original, so both algorithms are run currently. The new version files have extension *.new --- for now, until it's been vetted.

cuantar commented 1 year ago

Here is how I run it, from the directory outside of my local git repository where I've cloned things, so when I do ls I see timing_analysis and DR3:

./timing_analysis/src/timing_analysis/reflagger.py -t DR3/NANOGrav_15y/tim/J1312+0051_PINT_20220303.nb.tim -o output_file_name.out -p NANOGrav -c ./timing_analysis/mapping.toml

cuantar commented 1 year ago

I've noticed something weird. For some reason, my version is setting -fe L-wide for every line in the file, instead of preserving the -fe S-wide lines. the new diff technique using git diff made it obvious. I'll fix it!

cuantar commented 1 year ago

... should now be fixed. The only differences now between the two programs' outputs are additional flags, not changes to already-existing ones.

cuantar commented 1 year ago

I added a -d command line flag to turn the diff output on. Eventually we can remove the legacy code and also the diff, once the new version is vetted.

JPGlaser commented 1 month ago

Closing as its a stale merge.