EoRImaging / eppsilon

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

Potential contamination in k slices #13

Closed nicholebarry closed 7 years ago

nicholebarry commented 7 years ago

There is some potential contamination seen in the k slices. It's present between FoV and horizon lines, seen below at low k_y

uvkz_smaller

Is there some functionality to mask this, Bryna? And it would be cool if I could plot exactly where things were masked (especially for the low weight areas...it would be nice to look at a masked image to make sure all areas of contamination/low weights have been taking care of).

bhazelton commented 7 years ago

There is a 3d mask (called bin_mask_3d) that is created during the binning to 1D that tells you for each voxel which 1D bin it ended up in. The bins are numbered starting at one and any voxel that contains a zero is not included in any bin, so you can use this mask to see which voxels are excluded when binning to 1D. Currently, bin_mask_3d is not being saved in any file, instead what is saved is the 2D version (where I bin the 3D mask to 2D in the same way I do the data), but the 3D version exists and is used in ps_power.pro.

There is not currently a way to mask out portions of the kx/ky plane other than by limiting the included kperp range.

So two questions: 1.) How do you want to specify the kind of cut you want to do? 2.) I assume you'd like the bin_mask_3d to be saved somewhere. Where should it be saved? I'm currently leaning toward making a file just for it as I do for the 2D mask.

nicholebarry commented 7 years ago

1) I suppose I'd like to mask as a box in kx ky for each separate kz. I initially was going to say a wedge slice, but I think that I'd like to stay conservative and flag more than looks to be needed.

2) Wherever works for you.

bhazelton commented 7 years ago

Ok, so you want to be able to set a separate kx_range & ky_range? That would get you a box, but only one that is aligned with the kx/ky axes. I thought you wanted to be able to draw diagonal lines?

nicholebarry commented 7 years ago

Sure, whatever you want. Something sorta easy to code up that gets rid of the weird low ky contamination. If it turns out that it's a good idea, we can make something more sophisticated.

bhazelton commented 7 years ago

Ok, I'm implementing a kx and ky range, but I have another question. The ky values in the cube are positive definite, but kx goes positive and negative. For the kx range, should the values be interpreted with an abs (allowing you to leave out a region along low kx but getting larger kx values to each side)? Or do you want to specify a contiguous range that can run over negative or positive values?

nicholebarry commented 7 years ago

let's do the abs route

bhazelton commented 7 years ago

Ok, this should work now. The new wrapper keywords are: kx_range_1dave, kx_range_lambda_1dave, ky_range_1dave, ky_range_lambda_1dave

The ones with lambda in them are specified in wavelengths, the others are specified in Mpc^-1

bhazelton commented 7 years ago

I actually haven't added the code to save the 3d masks. Working on that now.

bhazelton commented 7 years ago

Ok, I've just added the 3D mask and the kx_mpc, ky_mpc, and kz_mpc vectors to the existing mask files (filenames like *_1to2d_mask.idlsave)