Skip to content

Commit

Permalink
Updated plotting example
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienbaron committed Aug 26, 2024
1 parent 344193b commit 2b84702
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
Binary file added demos/data/rho_Cas_example.oifits
Binary file not shown.
2 changes: 1 addition & 1 deletion demos/example_image_observables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ data = readoifits(oifitsfile); # data can be split by wavelength, time, etc.

# Display the data
uvplot(data);
plot_v2(data,logplot=true);# Alternatively, one can do v2plot(data.v2_baseline,data.v2,data.v2_err,logplot=true);
plot_v2(data,logplot=true);
plot_t3phi(data);
plot_t3amp(data);

Expand Down
18 changes: 18 additions & 0 deletions demos/example_plot_observables.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using OITOOLS
#
# EXAMPLE 1: read image and data, and compare the observables
#
# read the data file
oifitsfile = "./data/rho_Cas_example.oifits"
data = readoifits(oifitsfile)
# Display the data
uvplot(data, color="bases");
uvplot(data, color="wav");
uvplot(data, color="mjd");

plot_v2(data,color="bases")
plot_v2(data,color="wav")
plot_t3phi(data);
plot_t3phi(data, t3base="geom");

#plot_v2_and_t3phi_wav(data, logplot=true, figsize=(14,14))
11 changes: 0 additions & 11 deletions demos/example_plotting.jl

This file was deleted.

2 changes: 1 addition & 1 deletion src/oiplot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function uvplot(data::Union{OIdata,Array{OIdata,1}, Array{OIdata,2}};color::Stri
ax.locator_params(axis ="y", nbins=10)
ax.locator_params(axis ="x", nbins=10)
ax.set_aspect(1.0)
if (color == "baseline" || color =="base") # we need to identify corresponding baselines #TBD --> could be offloaded to readoifits
if (color == "baseline" || color =="base" || color =="bases" || color =="baselines") # we need to identify corresponding baselines #TBD --> could be offloaded to readoifits
baseline_list_v2 = [get_baseline_names(data[n].sta_name,data[n].v2_sta_index) for n=1:length(data)];
baseline_list_t3 = [get_triple_baselines_names(data[n].sta_name,data[n].t3_sta_index) for n=1:length(data)];
baseline=sort(unique(vcat(vcat(baseline_list_v2...),vec(hcat(baseline_list_t3...)))))
Expand Down

0 comments on commit 2b84702

Please sign in to comment.