Open arpan-52 opened 2 months ago
Hi Arpan:
I can try to take a look at this early next week. Could you post one of the FITS headers, since that can help with reproducing the bug?
Thanks, Cameron
Hi Arpan:
The FITS headers were exactly the clue I needed: they're missing critical keywords that RM-Tools uses to determine the dimensionality of the data. Specifically, there's no CRTYPE3 = FREQ
key, which would tell RM-Tools to use the 3rd axis as the frequency axis (it's interesting that this problem doesn't emerge until the write step -- I would have expected it to cause problems at the read step).
I can think of two solutions:
NAXIS = 3
and remove NAXIS4 = 1
). The write function defaults to using the last axis as the frequency axis, so it should work then.Cheers, Cameron
P.S.- I think you're sampling far to densely in Faraday depth, and not far enough out, given your frequencies. I'd recommend Phi_max ~= 1000, and dPhi ~ 10 rad/m2, to start with. With only 5 channels, you're going to have significant sidelobe structure in the RMSF.
I am running the rmsynth3d on a Q, U, I spectral cube with 4 frequency planes starting at 950 MHz to 1200 MHz. After slicing the images, all the time I am getting the same error.
#######
ustre/aoc/observers/nm-13972/anaconda3/envs/38data/lib/python3.8/site-packages/RMutils/util_RM.py:169: RuntimeWarning: invalid value encountered in multiply pCube = (dataQ + 1j dataU) weightArr[:, np.newaxis] Reading pl_4_8_I_E.fits ... done. Dimensions of the input cube are: NAXIS1 = 2000 NAXIS2 = 2001 NAXIS3 = 5 NAXIS4 = 1 Dimensions of the input array are: (5, 2001, 2000) Reading pl_4_8_Q_E.fits ... done. Dimensions of the input cube are: NAXIS1 = 2000 NAXIS2 = 2001 NAXIS3 = 5 NAXIS4 = 1 Dimensions of the input array are: (5, 2001, 2000) Reading pl_4_8_U_E.fits ... done. Dimensions of the input cube are: NAXIS1 = 2000 NAXIS2 = 2001 NAXIS3 = 5 NAXIS4 = 1 Dimensions of the input array are: (5, 2001, 2000) PhiArr = -50.00 to 50.00 by 0.10 (1001 chans). Weight type is 'uniform'. Calculating 1D RMSF and replicating along X & Y axes.
#######