Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Diameter or pixel scale parameter #13

Open
IanHeywood opened this issue Nov 7, 2018 · 4 comments
Open

Diameter or pixel scale parameter #13

IanHeywood opened this issue Nov 7, 2018 · 4 comments

Comments

@IanHeywood
Copy link

I think a nice enhancement would be to require the user to specify the number of pixels, but then optionally either the beam diameter or the pixel scale. The latter is more consistent with what a FITS header actually contains, and would make it easier to precisely and automatically map a primary beam model to a particular image.

(You could also cater for non-square pixels, and unequal image extents, for those rare people who use such things.)

Thanks.

@kmbasad
Copy link
Collaborator

kmbasad commented Mar 25, 2019

Sorry for the delay. I have pushed a new version of EIDOS today with 10 degree beams. Will try to add this functionality soon too.

@kmbasad
Copy link
Collaborator

kmbasad commented May 9, 2019

Added this option. Users can specify any two of these 3 options now: diameter, number of pixels, pixel scale.

@kmbasad kmbasad closed this as completed May 9, 2019
@IanHeywood
Copy link
Author

Having problems with the -r / -f approach:

$ eidos -p 3112 -r 0.00041666666666666666666666 -f 1065.2978515625 -S I
Traceback (most recent call last):
  File "/home/heywood-l/venv/eidos/bin/eidos", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/home/heywood-l/Software/eidos/bin/eidos", line 6, in <module>
    create_beam.main(sys.argv[1:])
  File "/home/heywood-l/Software/eidos/eidos/create_beam.py", line 81, in main
    params, freqs = zernike_parameters(filename, args.pixels, args.diameter, args.thresh)
  File "/home/heywood-l/Software/eidos/eidos/create_beam.py", line 18, in zernike_parameters
    Npix = int(diameter_orig/(diameter/npix))
ZeroDivisionError: float division by zero

@IanHeywood
Copy link
Author

I think this is the problem:

https://github.com/ratt-ru/eidos/blob/master/eidos/create_beam.py#L74

The diameter (in degrees) is forced to be an integer at this point. Removed the explicit int and it's running now.

@SpheMakh SpheMakh reopened this May 14, 2019
SpheMakh added a commit that referenced this issue Jun 21, 2019
lift integer restriction on beam diameter. See #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants