C++ bindings for reading/writing/manipulating OIFITS files.
bkloppenborg / ccoifits Goto Github PK
View Code? Open in Web Editor NEWC++ bindings for reading/writing/manipulating OIFITS files.
C++ bindings for reading/writing/manipulating OIFITS files.
In some OIFITS files more UV points than are present in the data are exported. This is particularly bad for liboi where the size of the UV points is pre-allocated and not easily changed at runtime.
Data in OIDataList format should be exportable to OIFITS files and (possibly) text files.
The text output is most likely to be used for plotting in external programs, like gnuplot
so high precision isn't required. I propose the user be prompted for a base filename
to which a _vis.txt
, _v2.txt
and _t3.txt
extension is added. The formats would be as follows:
filename_vis.txt
# Header describing data
u v vis vis_err
...
filename_v2.txt
# Header describing data
u v v2 v2_err
...
filename_t3.txt
# Header describing data
u1 v1 u2 v2 u3 v3 t3_amp t3_amp_err t3_phi t3_phi_err
...
The OIFITS specification defines the closure of three telescopes a,b, and c as the product of the complex visibilities around a closed triangle. If the three baselines a-b, b-c, and c-a can be represented as (u1, v1), (u2, v2),
and (u3, v3)
respectively, then the bispectra is formed via:
B(1,2,3) = V(u1,v1) V(u2,v2) V*(u3, v3).
with (u1,v1), (u2,v2), (u3, v3) = (u1 + u2, v1 + v2)
per the OIFITS specification. LIBOI, however, reverses the third UV coordinate to form the closed triangle immediately. This is undesired behavior and should be removed. Changes will need to be propagated to other inheriting code.
Although it is against the FITS format specification, AMBER data tables with the same name all have EXTVER = 1. This makes the reading functions in COIFile::read() fail because the table EXTVER is never incremented:
table = &mOIFITS->extension("OI_ARRAY", i+1);
If we change the reading routines to simply iterate over HDUs and process those with the correct name, instead of selecting the name and iterating over EXTVER this could be avoided.
ccoifits will segfault when opening a file with no data:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd78ff700 (LWP 15097)]
0x00000000005778ac in ccoifits::UVKDTree::uv_sort_u (a=..., b=...)
at /home/bkloppenborg/workspace/simtoi/lib/ccoifits/src/UVKDTree.cpp:217
217 return a.first < b.first;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.