lacker / seticore

A high-performance implementation of some core SETI algorithms that can be included in other programs.
MIT License
3 stars 7 forks source link

src_raj and src_dec attributes in HDF5 outputs are using wrong units #19

Closed david-macmahon closed 2 years ago

david-macmahon commented 2 years ago

The src_raj and src_dec attributes in "filterbank HDF5" (aka FBH5) outputs appear to be in radians. In the FBH5 files, src_raj should be in hours (i.e. radians 12/pi) and src_dej should be in degrees (i.e. radians 180/pi).

This is different from the BFR5 files which use radians for all angle measures.

lacker commented 2 years ago

I see. And raw files store hours and degrees in xx:mm:ss format, right?

lacker commented 2 years ago

All right, I think https://github.com/lacker/seticore/commit/adb043ee69c88dc38c97eb186c49588565056ae5 fixes it, so that ra and dec are just hours and degrees everywhere except internally to the RecipeFile object. Not deployed to meerkat yet, I have some cleanup so this should be in with 0.2.0 (which will write out stamp files)

lacker commented 2 years ago

Oops, it looks like src_raj and src_dej are actually stored not quite as a unit-change from radians, but in

HHMMSS.S

format, which I hate by the way.

lacker commented 2 years ago

The documentation claims src_raj and src_dej are these sigproc formats, but in practice that does not seem to be what they look like:

>>> f["data"].attrs["src_dej"]
18.7673
>>> f["data"].attrs["src_raj"]
20.159433333333332

the plot thickens....

lacker commented 2 years ago

Talking with @texadactyl - seems like the fil headers use HHMMSS.S format, and the h5 headers use plain hours/degrees, so since this is writing to h5s it's consistent. If I ever add in fil-writing I'll have to take this into account.