EoRImaging / eppsilon

eppsilon - error propagated power spectrum with interleaved observed noise
BSD 2-Clause "Simplified" License
5 stars 4 forks source link

upside down plots with chips #117

Closed nicholebarry closed 4 years ago

nicholebarry commented 4 years ago

CHIPS uses eppsilon's plotting code, but for some reason, the 2D plots are always upside-down. I tried experimenting with hardcoding the LANDSCAPE keyword to 0, and that seemed to work. Now, this kinda doesn't make sense, because it seems as though setting LANDSCAPE to 1 is supposed to force the image right-side-up. Any thoughts as to what is happening, Bryna?

Here's and example call that CHIPS uses for context:

kpower_2d_plots,kperp_edges=kper[1:nbins3],kpar_edges=kpa[0:Nchancut/2], /hinv,hubble_param=0.7, power=(crosspower[1:nbins-10,0:Nchancut/2-1]), /plot_wedge_line,wedge_amp=[1.,wedgeedge], window_num=0, title_prefix=instring1,start_multi_params=struc,plotfile=output,/png, data_range=[plot_min_2D,plot_max_2D],/baseline_axis,kperp_lambda_conv=conv_factor,/delay_axis,delay_params=delay_params,kpar_bin=kpar_bin

bhazelton commented 4 years ago

Hmm, that is weird. What version of IDL are you using? It's possible this page might help: http://www.idlcoyote.com/ps_tips/landscapeup.html

But the solution it suggests is exactly what we are doing.

nicholebarry commented 4 years ago

CHIPS users: add cgps_close, /png, /delete_ps, density = 600 after every panel plot (usually two to four calls of kpower_2d_plots)

Turns out that the typical CHIPS plotting script does not properly end the creation of plots. Since we are building panelled plots with kpower_2d_plots, we have to call it multiple times with different plot positions. We need to manually end the png creation after calling all appropriate kpower_2d_plots. Kinda weird that the only fail mode is that the plots are upside-down, but eh.