lpsinger / ligo.skymap

Localization of gravitational-wave transients. Mirror of https://git.ligo.org/lscsoft/ligo.skymap
22 stars 18 forks source link

Issue with running the Script for ligo_skymap_plot_volume.py #18

Closed choudharyharsh122 closed 1 year ago

choudharyharsh122 commented 1 year ago

how do I run the script for ligo_skymap_plot_volume.py , everytime I do this, i run into some problem with relative imports.

lpsinger commented 1 year ago

Please supply some more detail.

choudharyharsh122 commented 1 year ago

I cloned your repo and I am trying to plot the projections along the 3 directions.

This is how I am trying to run the script:
! python ligo/skymap/tool/ligo_skymap_plot_volume.py -annotate 'False' -max_distance '100' -contour '90' -projection '0' -input 'https://emfollow.docs.ligo.org/userguide/_static/bayestar.fits.gz'

I am getting the following error: Traceback (most recent call last): File "/home/harsh/ligo.skymap/ligo/skymap/tool/ligo_skymap_plot_volume.py", line 20, in from . import ArgumentParser, FileType ImportError: attempted relative import with no known parent package

lpsinger commented 1 year ago

You don't need to clone this repository to use ligo.skymap. Just follow the installation instructions here: https://lscsoft.docs.ligo.org/ligo.skymap/quickstart/install.html

lpsinger commented 1 year ago

Is this working for you now?

choudharyharsh122 commented 1 year ago

Hi @lpsinger , yes it's working for me now, many thanks. I wanted to make some modifications in the distance plot