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

Passing scpos to GbmHealPix should generate geo_loc the same way it generates geo_radius #52

Open
eburnsastro opened this issue Oct 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@eburnsastro
Copy link

Example code below. This generates a GbmHealPix from a Gaussian, adds a systematic, then attempts to remove Earth. After running the below script, 'example_map_stat_only.geo_radius' gives 67.5 deg, demonstrating it is using the x,y,z information in scpos to generate the radius. I believe this can similarly be used to generate geo_loc, with the (ra_dec) for the geo center being the spherical representation calculated by converting the negative of the scpos

from gdt.missions.fermi.gbm.localization import GbmHealPix
example_RA = 178.017
example_Dec = -18.117
example_Err = 7.88


# generation of Gaussian skymap using the data tools
example_map_stat_only = GbmHealPix.from_gaussian(example_RA, example_Dec, 
                            example_Err, scpos=array([1656.69361922, 6634.3140278 ,  875.01112923]))
skyplot = EquatorialPlot()
skyplot.add_localization(example_map_stat_only, detectors=None)
plt.show()

# as the data tools have convolution built in to add a systematic
example_map_full_errors = example_map_stat_only.convolve(GBM_GND_Model)
skyplot = EquatorialPlot()
skyplot.add_localization(example_map_full_errors, detectors=None)
plt.show()

# example_map_full_errors_no_earth = example_map_full_errors.remove_earth()
example_map_full_errors_no_earth = GbmHealPix.remove_earth(example_map_full_errors)
skyplot = EquatorialPlot()
skyplot.add_localization(example_map_full_errors_no_earth, detectors=None)
plt.show()
@eburnsastro
Copy link
Author

It looks like this may already be implemented in the GBM data tools, but not gdt-fermi

@eburnsastro
Copy link
Author

From talking with Adam, it is not calculating georadius, it is just using a default value

@AdamGoldstein-USRA AdamGoldstein-USRA added the bug Something isn't working label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants