VLBIData.jl
VLBIData
reads and writes a range of data formats typically used in very long baseline interferometry (VLBI).
For convenience, it exports itself as VLBI
: non-exported functions are accessed as VLBI.load
.
See the table of contents and sections below for the list of supported formats. The proper file format is guessed automatically, and typically one just needs the VLBI.load(file)
method.
Some formats, such as "image FITS", may actually contain multiple datasets of different kinds (eg image + model). In such cases, VLBI.load(file)
reads the main dataset (image) by default. Use VLBI.load(type, file)
to read the dataset of type
from the file
: see examples below.
VLBIData
is well-tested. It is regularly confirmed to read all files in the Astrogeo database successfully.
Image FITS
Read image itself
Load the image data from a FITS file:
The returned object contains both the header information, and the image data as an array:
"J0000+0248"
2-dimensional KeyedArray(NamedDimsArray(...)) with keys: ↓ ra ∈ 512-element StepRangeLen{Unitful.Quantity{Float64,...} → dec ∈ 512-element StepRangeLen{Unitful.Quantity{Float64,...} And data, 512×512 Matrix{Float32}: (-51.2 mas) … (51.0 mas) (51.0 mas) -4.92649f-6 0.000202965 (50.8 mas) 2.129f-5 0.000178501 (50.6 mas) 7.48033f-5 0.000125342 ⋮ ⋱ (-50.6 mas) 0.000115528 … -0.0001272 (-50.8 mas) 8.01195f-5 -7.8384f-5 (-51.0 mas) 9.25147f-6 5.1111f-6 (-51.2 mas) -7.57209f-5 9.37739f-5
As you see, the image data is a KeyedArray
. It contains information about axes and their units for convenient look up, indexing, plotting, ...:
1-dimensional KeyedArray(NamedDimsArray(...)) with keys: ↓ ra ∈ 512-element StepRangeLen{Unitful.Quantity{Float64,...} And data, 512-element view(::Matrix{Float32}, :, 282) with eltype Float32: (51.00000085048702 mas) -9.41605f-5 (50.80000084715178 mas) -0.00010086887 (50.60000084381653 mas) -0.000102033504 (50.40000084048129 mas) -9.566722f-5 (50.20000083714605 mas) -8.480035f-5 ⋮ (-50.60000084381653 mas) -4.763418f-5 (-50.80000084715178 mas) -5.425684f-6 (-51.00000085048702 mas) 1.2369155f-5 (-51.20000085382226 mas) 3.7464752f-6
Access the so-called "image beam" - the effective point spread function - and add it to the image:
6.551945156399848 mas^2
1.7109050766198861 mas
0.35623661482068336
-0.04649986326694402
0.0 mas
0.0 mas
Read source model
FITS image files commonly contain the source model itself, often as a set of delta functions - "CLEAN components". Components are stored in the AIPS CC
FITS table.
To load this model instead of the image array, pass the corresponding type to VLBI.load
:
0.0105731 Jy
0.00231316 Jy
0.00337947 Jy
0.00173057 Jy
0.00166763 Jy
0.00185511 Jy
3.99649f-5 Jy
0.00192035 Jy
0.000381363 Jy
2.69026f-6 Jy
The MultiComponentModel
type, as well as components themselves, are defined in the InterferometricModels.jl
package. See its help for more details on how to use these models.
For example, we can convolve the CLEAN model with the image beam:
0.0692741 Jy mas^2
1.71091 mas
0.356237
-0.0464999
0.0151557 Jy mas^2
1.71091 mas
0.356237
-0.0464999
0.0221421 Jy mas^2
1.71091 mas
0.356237
-0.0464999
0.0113386 Jy mas^2
1.71091 mas
0.356237
-0.0464999
0.0109262 Jy mas^2
1.71091 mas
0.356237
-0.0464999
0.0121546 Jy mas^2
1.71091 mas
0.356237
-0.0464999
0.000261848 Jy mas^2
1.71091 mas
0.356237
-0.0464999
0.012582 Jy mas^2
1.71091 mas
0.356237
-0.0464999
0.00249867 Jy mas^2
1.71091 mas
0.356237
-0.0464999
1.76264e-5 Jy mas^2
1.71091 mas
0.356237
-0.0464999