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

bug in calculation of time axis for MS ObsCore metadata #635

Open
d3v-null opened this issue Dec 17, 2024 · 0 comments
Open

bug in calculation of time axis for MS ObsCore metadata #635

d3v-null opened this issue Dec 17, 2024 · 0 comments

Comments

@d3v-null
Copy link

in ObsCoreMeta.from_visibility, t_xel ("Number of elements along the time axis.") is given by:

ocm.t_xel = MSMainTable.nrows(ms_path=vis_inode)

According to the test, this should be 24

number_of_time_steps=24,

but if we update the test to check for 24 time steps, the test fails because t_xel is 15120

expected_timesteps = 24
if visibility.format == "OSKAR_VIS":
  observation = Observation(..., number_of_time_steps=expected_timesteps)
...
assert ocm.t_xel is not None and ocm.t_xel == expected_timesteps

What we really want is the number of unique values in the time array. this passes:

ocm.t_xel = len(np.unique(MSMainTable.get_col(ms_path=vis_inode, col="TIME", nrow=300000000)))

I intend to fix this in an upcoming PR that also ads uvfits support.

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

No branches or pull requests

1 participant