Skip to content

Commit

Permalink
Changing the way of importing SkyGrid class and correcting the import
Browse files Browse the repository at this point in the history
of pycbc.conversions
  • Loading branch information
jacquot committed Jan 9, 2025
1 parent 8da4055 commit b9367d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/pycbc_make_sky_grid
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ from scipy.spatial.transform import Rotation as R
import pycbc
from pycbc.detector import Detector
from pycbc.types import angle_as_radians
from pycbc.tmpltbank import sky_grid
from pycbc.tmpltbank.sky_grid import SkyGrid


def spher_to_cart(sky_points):
Expand Down Expand Up @@ -164,7 +164,7 @@ rota = r.apply(cart)
# Convert cartesian coordinates back to spherical coordinates
spher = cart_to_spher(rota)

sky_grid = sky_grid.SkyGrid(
sky_grid = SkyGrid(
spher[:, 0], spher[:, 1], args.instruments, args.trigger_time
)

Expand Down
3 changes: 2 additions & 1 deletion pycbc/tmpltbank/sky_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import h5py

from pycbc.detector import Detector
from pycbc.conversion import ensurearray
from pycbc.conversions import ensurearray


class SkyGrid:
def __init__(self, ra, dec, detectors, ref_gps_time):
Expand Down

0 comments on commit b9367d4

Please sign in to comment.