-
Notifications
You must be signed in to change notification settings - Fork 496
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
tlist() should return list #186
base: main
Are you sure you want to change the base?
Conversation
Can you make a trivial example that shows the bad thing happening? |
Thanks, Greg, and sorry for the delay on this! I just tried manually overwriting the scan_table and using the scan_gather=True option in obs.tlist(), and the current code returned a tlist of length 1, but indeed obs.tlist()[0] was not of the right datatype. I agree reverting to a list for the output of obs.tlist() would fix this issue, but I think the output of obs.tlist() has to be an array for eh.self_cal() function to work. I will check this and try to find a solution. In any case, thank you for pointing this out and I will try to fix it asap! |
I created a new python environment with python==3.9, then did "pip install ehtim". Afterwards, assuming I've got the "EHT2017.txt" array file, run
Error at obs.add_all() and observing obs.tlist(), the recarray has lost its column attributes. So indexing by the attribute fails. I note that this particular issue doesn't appear if I run inside a clone of the eht-imaging GitHub repository. Result/traceback from the above:
|
…elds This commit adds the 'w' coordinate to the polarization data structures and observation fields in the `const_def.py` file. The 'w' coordinate represents the third dimension in the UVW coordinate system. This addition allows for the representation of three-dimensional data in polarization calculations. Additionally, the `recompute_uv` method in the `Obsdata` class in the `obsdata.py` file has been modified to include the 'w' coordinate when recomputing the u,v points using observation times and metadata. The modification allows for the computation of three-dimensional u,v,w coordinates for an array at a given time for a source at a given ra, dec, and rf. The `compute_uv_coordinates` function in the `obs_helpers.py` file has also been updated to include the 'w' coordinate in the computation of u,v,w coordinates for an array at a given time for a source at a given ra, dec, and rf. Lastly, the `make_uvpoints` function in the `obs_simulate.py` file has been modified to include the 'w' coordinate in the generated UV points. This modification allows for the generation of three-dimensional UVW points for simulated observations.
Method comments suggest that tlist() should return list. If the observation has only one scan, or if all scans have the same shape, np.array(datalist, dtype=object) can produce a bug, i.e. when you run the add_all() method, because the tlist can't be indexed by the array attribute.