Skip to content

Commit

Permalink
Allow Comrade to work with new Pyehtim version
Browse files Browse the repository at this point in the history
  • Loading branch information
ptiede committed Dec 18, 2024
1 parent 8ecc3ad commit 0e48002
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ext/ComradePyehtimExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ function build_arrayconfig(obs)
bw = get_bw(obsc)
angles = get_fr_angles(obsc)
tarr = StructArray(Pyehtim.get_arraytable(obsc))

# This is because sometimes eht-imaging sets the scans to nothing
# and sometimes it fills it with junk
if length(obsc.scans) <= 1
obsc.add_scans()
end
scans = StructArray(get_scantable(obsc))
bw = get_bw(obsc)
elevation = StructArray(angles[1])
Expand Down
1 change: 0 additions & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,3 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TransformVariables = "84d833dd-6860-57f9-a1a7-6da5db126cff"
VLBIImagePriors = "b1ba175b-8447-452c-b961-7db2d6f7a029"
VLBISkyModels = "d6343c73-7174-4e0f-bb64-562643efbeca"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
1 change: 1 addition & 0 deletions test/test_util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function load_data()
joinpath(@__DIR__, "../examples/Data/array.txt"),
polrep="circ"
)
obspol.add_scans()

m = ehtim.model.Model()
m = m.add_gauss(1.0, μas2rad(40.0), μas2rad(20.0), π/3, 0.0, 0.0)
Expand Down

0 comments on commit 0e48002

Please sign in to comment.