Skip to content

Commit

Permalink
class renaming: pavingSky -> PavingSky
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe Gris committed Apr 28, 2020
1 parent 7c79b6d commit 591b8f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions sn_tools/sn_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def patchObs(observations, fieldType,
# in that case min and max dec are given by obs strategy
minDec = np.min(observations['fieldDec'])-radius
maxDec = np.max(observations['fieldDec'])+radius
areas = pavingSky(RAmin, RAmax, minDec, maxDec, radius, radius)
areas = PavingSky(RAmin, RAmax, minDec, maxDec, radius, radius)
# print(observations.dtype)
if display:
areas.plot()
Expand All @@ -158,7 +158,7 @@ def patchObs(observations, fieldType,
# radius = 0.1
RA = np.unique(observations[RACol])[0]
Dec = np.unique(observations[DecCol])[0]
areas = pavingSky(RA-radius/2., RA+radius/2., Dec -
areas = PavingSky(RA-radius/2., RA+radius/2., Dec -
radius/2., Dec+radius/2., radius, radius)

patches = pd.DataFrame(areas.patches)
Expand Down Expand Up @@ -198,7 +198,7 @@ def getPix(nside, fieldRA, fieldDec):
return healpixId, pixRA, pixDec


class pavingSky:
class PavingSky:
def __init__(self, minRA, maxRA, minDec, maxDec, radius_RA, radius_Dec):
""" class to perform a paving of the sky with rectangles
Expand Down
6 changes: 3 additions & 3 deletions tests/testSNtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from sn_tools.sn_cadence_tools import TemplateData, AnaOS, Match_DD
from sn_tools.sn_calcFast import LCfast, CalcSN, CalcSN_df, CovColor
from sn_tools.sn_lcana import LCtoSN
from sn_tools.sn_obs import renameFields, patchObs, getPix, pavingSky, DDFields
from sn_tools.sn_obs import renameFields, patchObs, getPix, PavingSky, DDFields
from sn_tools.sn_obs import DataInside, proj_gnomonic_plane, proj_gnomonic_sphere
from sn_tools.sn_obs import pixelate, season, DataToPixels, ProcessPixels, ProcessArea, getFields
from sn_tools.sn_clusters import ClusterObs
Expand Down Expand Up @@ -1177,7 +1177,7 @@ def testgetPix(self):
assert(np.isclose(pixRA, pixRA_ref))
assert(np.isclose(pixDec, pixDec_ref))

def testpavingSky(self):
def testPavingSky(self):

minRA = 20.
maxRA = 30.
Expand All @@ -1186,7 +1186,7 @@ def testpavingSky(self):
radius_RA = 5.
radius_Dec = 5.

sky = pavingSky(minRA, maxRA, minDec, maxDec, radius_RA, radius_Dec)
sky = PavingSky(minRA, maxRA, minDec, maxDec, radius_RA, radius_Dec)

patches = sky.patches

Expand Down

0 comments on commit 591b8f9

Please sign in to comment.