Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dtype in Info object (and other useful attributes to have?) #474

Open
theXYZT opened this issue Nov 28, 2020 · 1 comment
Open

Dtype in Info object (and other useful attributes to have?) #474

theXYZT opened this issue Nov 28, 2020 · 1 comment

Comments

@theXYZT
Copy link
Contributor

theXYZT commented Nov 28, 2020

Based on #472, I noticed that the General Info class could expose a few more attributes that are useful. Here are a couple I was surprised to see weren't provided:

  1. dtype: Weird this isn't explicitly available as complex_data is provided and, from reading the code in base/base.py, it appears that dtype is inferred via np.complex64 if self.complex_data else np.float32

  2. sample_shape: Since shape is provided, shouldn't sample_shape be provided as well?

@theXYZT theXYZT changed the title Dtype in Info object Dtype in Info object (and other useful attributes to have?) Nov 28, 2020
@mhvk
Copy link
Owner

mhvk commented Dec 17, 2021

Going over old issues: yes, this makes sense. I thought initially that info should just provide a minimal set, but really dtype is useful. And easy to do, just add some parent attributes to base.file_info.StreamReaderInfo...

p.s. I'd also like to add some more control over the exact dtype. Perhaps float16 for some cases, or even allow integer representation to be used. For incoherent dedispersion plus gating and then writing out, one does not need the transformation to float.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants