Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

--output-eight doesn't seem to work #9

Open
IanHeywood opened this issue Jun 20, 2018 · 7 comments
Open

--output-eight doesn't seem to work #9

IanHeywood opened this issue Jun 20, 2018 · 7 comments
Labels

Comments

@IanHeywood
Copy link

I still get a single FITS file when I set the --output-eight (or -o8) option, whether or not I specify a prefix.

@SpheMakh
Copy link
Collaborator

Are you using the latest master branch?

I just ran this:

eidos --pixels 512 --freq 850 1760 64 --diameter 6 --coefficients-file input/meerkat_coeff_dict.npy --prefix MeerKAT-LBand-PB-64chans --output-eight 

and got the eight FITS files

@IanHeywood
Copy link
Author

I am using the latest master, I installed it as per the instructions shortly before I filed this issue.

When I run your command I get eight files. But when I request only a single frequency I don't:

eidos --output-eight -p 1024 -d 3 -f 1280 -c eidos/eidos/data/meerkat_coeff_dict.npy -P beamtest

@IanHeywood
Copy link
Author

Naively trying to get around this by passing three values to freq in order to force a single channel causes a crash:

$ eidos --output-eight -p 1024 -d 3 -f 1280 1281 1 -c eidos/eidos/data/meerkat_coeff_dict.npy -P beamtest21
1280.0
Traceback (most recent call last):
  File "/home/ianh/.local/bin/eidos", line 6, in <module>
    create_beam.main(sys.argv[1:])
  File "/home/ianh/.local/lib/python2.7/site-packages/eidos/create_beam.py", line 58, in main
    write_fits_eight(data, nu, args.diameter, filename)
  File "/home/ianh/.local/lib/python2.7/site-packages/eidos/util.py", line 89, in write_fits_eight
    write_fits_cube(data[i,j,:,:,:].real, freqs, diameter, filename+'_re.fits')
  File "/home/ianh/.local/lib/python2.7/site-packages/eidos/util.py", line 64, in write_fits_cube
    cdelts = [diam/beam.shape[-2], diam/beam.shape[-1], fMHz[1]-fMHz[0]]
IndexError: index 1 is out of bounds for axis 0 with size 1

None of this is disastrous of course, I can just access the planes I need from the (hyper)cube, but it seems like a legit bug.

Cheers.

@SpheMakh SpheMakh added the bug label Jun 20, 2018
@kmbasad
Copy link
Collaborator

kmbasad commented Jun 21, 2018

The bug should be fixed now. And also I added the Stokes/Mueller formalism, so the I-beam can be calculated by adding -S I option. Help file has been updated as well.

@IanHeywood
Copy link
Author

Awesome, thanks @kmbasad, @SpheMakh

@IanHeywood
Copy link
Author

My understanding (which may be way off) is that the Stokes I beam is the one I should use to naively correct for the primary beam in the image plane, i.e. by dividing the map by the beam (and weighting by the square of the Stokes I beam when forming a linear mosaic).

However when I do this the fluxes are biased high (by factors up to ~3), i.e. the Eidos Stokes I beam is much narrower than one would expect.

Maybe someone can verify this independently, or tell me if I have misunderstood something.

Thanks.

@kmbasad
Copy link
Collaborator

kmbasad commented May 9, 2019

Hi Ian,

Do you see this problem even now?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants