EoRImaging / eppsilon

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

fix bug with differencing windowed and un-windowed cubes #82

Closed bhazelton closed 5 years ago

nicholebarry commented 5 years ago

Bit of a snag with the structures...

IDL> ps_diff_wrapper,['/fred/oz048/MWA/CODE/FHD/fhd_nb_pipeline_paper','/fred/oz048/MWA/CODE/FHD/fhd_nb_data_BHgrid'],['Aug23_zenith','Aug23_zenith'],/png,image_window_name=['Blackman-Harris','None'],/refresh_diff, full_image=1
% Compiled module: PS_DIFF_WRAPPER.
% Compiled module: GET_FOLDER.
% Compiled module: PS_FILENAMES.
% Compiled module: UNDEFINE.
% Compiled module: NUMBER_FORMATTER.
% Compiled module: CREATE_BINNING_1D_OPTIONS.
% Compiled module: CREATE_UVF_OPTIONS.
% Compiled module: UPDATE_OPTION_STRUCT.
% Compiled module: TAG_EXIST.
% Conflicting data structures: UVF_OPTIONS0,UVF_OPTIONS1.
% Execution halted at: PS_DIFF_WRAPPER   124 /home/nbarry/MWA/eppsilon/ps_wrappers/ps_diff_wrapper.pro
%                      $MAIN$          
IDL> help, uvf_options0
** Structure <1ff1898>, 3 tags, length=24, data length=20, refs=1:
   NO_DFT_PROGRESS INT              0
   FULL_IMAGE      INT              0
   IMAGE_WINDOW_NAME
                   STRING    'Blackman-Harris'
IDL> help, uvf_options1
** Structure <1feeb18>, 2 tags, length=4, data length=4, refs=1:
   NO_DFT_PROGRESS INT              0
   FULL_IMAGE      INT              0
bhazelton commented 5 years ago

arg! sorry about all the python-isms you had to fix. The structure problem is a deeper one, I need to think about the right thing to do about that.

bhazelton commented 5 years ago

@nicholebarry sorry I was so slow on this. I think it should be fixed now.

nicholebarry commented 5 years ago

A few more issues:

The full_image keyword must be included for things to work. With the command image_window_name=['Blackman-Harris','None'] without specifying full_image, I still get this error:

% COMPARE_PLOT_PREP: No power file for dirty_xx and info_file: /fred/oz048/MWA/CODE/FHD/fhd_nb_data_BH2grid_BH2degrid/ps/Combined_obs_Aug23_zenith_cubeXX__even_odd_joint_info.idl
                     save
% Execution halted at: COMPARE_PLOT_PREP  624 /home/nbarry/MWA/eppsilon/ps_compare/compare_plot_prep.pro
%                      PS_DIFFERENCE_PLOTS   13 /home/nbarry/MWA/eppsilon/ps_plotting/ps_difference_plots.pro
%                      PS_DIFF_WRAPPER   211 /home/nbarry/MWA/eppsilon/ps_wrappers/ps_diff_wrapper.pro
%                      $MAIN$

The image note seems a little off screen shot 2018-11-05 at 1 36 59 pm

bhazelton commented 5 years ago

So I think that's right, if you don't specify full_image you're asking for a run that cuts down to the older image size (even if the input Healpix cubes are larger). Even if it found the files (presumably it didn't because you didn't run them), it would have errored later because the uv planes wouldn't match, so they couldn't be differenced. Note that I added the possibility to pass 2 different full_image values now, so you should be able to call it with image_window_name=['Blackman-Harris','None'], full_image=[0,1].

The note does seem off, I'll look at that...

nicholebarry commented 5 years ago

Oh, I didn't notice the change to full_image. That makes more sense now. I'm fine with that setup.

bhazelton commented 5 years ago

@nicholebarry is this ready to merge?