Problem running jupiter catalog example, issue with drawing of magnitudes

Issue #55 resolved
Former user created an issue

The Jupiter catalog example in the examples folder seems to not run on v5.4.11

Running using:

phosim ./examples/jupiter

Additionally, magnitudes seem to be constrained to be drawn from a discrete distribution based on source/mag_dist (not sure if there's a physical reason for this). Jupiter's magnitude is negative, which doesn't appear in mag_dist and may be causing the issue.

Comments (6)

  1. John Peterson

    I think it is probably just that it is too bright for the default (generic) telescope you have chosen, and it would take a long time to finish. Generic is still a 1 meter telescope.

    Instead, if you do:

    phosim examples/jupiter -i galileo

    then it will use galileo’s small telescope, and it seems to finish in a few seconds when I run it.

    Also, mag_dist isn’t used for anything in phosim code, and is really not part of the code base.

    Let me know if that works,

    John

  2. Ron

    I was not logged in when I made the initial report, the change of instrument seems to deal with the Jupiter problem.

    As for the distribution question, it is related to how the magnitudes for catalogs are drawn from a distribution randomly, when a catgen*.cat file is generated by using commands such as:

    stars MIN_MAG MAX_MAG 0.666
    galaxies MIN_MAG MAX_MAG 0.666
    

    For the catalog

    rightascension 0
    declination 0
    moonalt -90.0
    stars 15.0 30.0 0.666
    galaxies 15.0 30.0 0.666
    

    The distribution of generated magnitudes (of form “object ID RA DEC MAG ../sky/sed_flat.txt 0.0 0.0 0.0 0.0 0.0 0.0 star none none”) is:

    And then for:

    rightascension 0
    declination 0
    moonalt -90.0
    stars 0.0 15.0 0.666
    galaxies 0.0 15.0 0.666
    

    Likewise, for:

    rightascension 0
    declination 0
    moonalt -90.0
    stars 15.0 18.0 0.666
    galaxies 15.0 18.0 0.666
    

    I did additional prototyping and these all seem to be “slices” of the same distribution, potentially with a limit on how many sample can be generated.

    For any catalogs with maximum magnitudes less than 15.0, few or no stars/galaxies are generated. Is this expected behavior?

  3. John Peterson

    Ron-

    Yes, this is what I would expect. The distribution for galaxies and stars rises quite dramatically as you go up in magnitudes until it falls at the high end. When you use PhoSim’s catalog generator as you are doing, it makes the galaxies from a cosmological 3-d distribution and has some spatial structure for the Milky Way for that stars as well. This results in the magnitude distribution that you see, and will depend on the RA/dec you choose as well. The only way you can get a lot of objects brighter than 15th magnitude is by having a much larger field than the 0.666 degree diameter that you have chosen. So if you increase that number (and say cut off the high magnitude so you don’t get too many sources), you will see that you will have more sources at the bright magnitudes.

    John

  4. Log in to comment