mhvk / baseband-tasks

A package for radio baseband data reduction and analysis.
https://baseband.readthedocs.io/projects/baseband-tasks
GNU General Public License v3.0
9 stars 11 forks source link

Decide how to pass on "count" (or "weight"?) #48

Open mhvk opened 5 years ago

mhvk commented 5 years ago

We briefly had a BaseData subclass of ndarray with a count attribute (#44), but this was rather problematic, so for now we are using a structured dtype with 'data' and 'count' entries (#38). Should think if that is really what we want.

mhvk commented 5 years ago

While thinking about what to do with count in, e.g., dedispersion: possibly, it should just be a float so that it can be dedispersed. Indeed, it might make sense to more generally call it "weight".

luojing1211 commented 5 years ago

If we are going to use "The weight" as a data mask. Can we make something like a masked array?

mhvk commented 5 years ago

Can we make something like a masked array?

That would be a good solution. Ideally we implement something that can replace the data we have and "just work" for tasks like Dedispersion. Alternatively, we could add a 2-item dimension to the sample shape.

luojing1211 commented 5 years ago

I am trying to picture how does out pipeline handle the mask/weight. The weight array flows with the pipeline. Another interesting question is should we include the weight to our output file, psrfits file.

mhvk commented 5 years ago

Yes, my hope was that by having a float weight, one could just "dedisperse" it, etc. Ideally, we do indeed have the weight in the output file too.