a2p2 0.7.7__py3-none-any.whl → 0.7.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- a2p2/jmmc/catalogs.py +7 -4
- a2p2/version.py +7 -3
- {a2p2-0.7.7.dist-info → a2p2-0.7.8.dist-info}/METADATA +1 -1
- {a2p2-0.7.7.dist-info → a2p2-0.7.8.dist-info}/RECORD +8 -8
- {a2p2-0.7.7.dist-info → a2p2-0.7.8.dist-info}/WHEEL +1 -1
- {a2p2-0.7.7.dist-info → a2p2-0.7.8.dist-info}/entry_points.txt +0 -0
- {a2p2-0.7.7.dist-info → a2p2-0.7.8.dist-info}/licenses/LICENSE +0 -0
- {a2p2-0.7.7.dist-info → a2p2-0.7.8.dist-info}/top_level.txt +0 -0
a2p2/jmmc/catalogs.py
CHANGED
@@ -28,6 +28,7 @@ class Catalog():
|
|
28
28
|
self.catalogName = catalogName
|
29
29
|
self.updated = False
|
30
30
|
self.lastTable = None
|
31
|
+
self.lastDataFrame = None
|
31
32
|
self.where = where
|
32
33
|
self.joins = joins
|
33
34
|
self.prod = prod
|
@@ -93,13 +94,15 @@ class Catalog():
|
|
93
94
|
"""
|
94
95
|
return self.api._get(f"/{self.catalogName}/{id}")
|
95
96
|
|
96
|
-
def getDataFrame(self):
|
97
|
+
def getDataFrame(self, forceUpdate=False):
|
97
98
|
""" Get a pandas DataFrame from the main catalog joined the other if provided in constructor.
|
98
99
|
|
99
100
|
usage: cat.getDataFrame()
|
100
101
|
"""
|
101
|
-
|
102
|
-
|
102
|
+
if not ( self.updated or forceUpdate or self.lastDataFrame is None):
|
103
|
+
return self.lastDataFrame
|
104
|
+
self.lastDataFrame = self.getTable(forceUpdate=forceUpdate).to_pandas()
|
105
|
+
return self.lastDataFrame
|
103
106
|
|
104
107
|
def getTable(self, maxrec=10000, forceUpdate=False):
|
105
108
|
""" Get an astropy table from the main catalog joined the other if provided in constructor.
|
@@ -108,7 +111,7 @@ class Catalog():
|
|
108
111
|
"""
|
109
112
|
# using SELECT TOP N below to workarround astroquery.utils.tap BUG
|
110
113
|
|
111
|
-
if not self.updated
|
114
|
+
if not ( self.updated or forceUpdate or self.lastTable is None ):
|
112
115
|
return self.lastTable
|
113
116
|
|
114
117
|
clauses = []
|
a2p2/version.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
__version__ = "0.7.
|
1
|
+
__version__ = "0.7.8"
|
2
2
|
|
3
3
|
__release_notes__ = {
|
4
4
|
# "0.1.6": {
|
@@ -23,9 +23,13 @@ __release_notes__ = {
|
|
23
23
|
# "Try to read OB in P2 and send them back to Aspro2 as a new obs",
|
24
24
|
# ],
|
25
25
|
|
26
|
-
"0.7.
|
26
|
+
"0.7.8": {
|
27
27
|
"A2P2": [
|
28
|
-
"
|
28
|
+
"catalogs : use cache for dataFrame() so we can modify it (was recreated from astropy table on each call)",
|
29
|
+
],
|
30
|
+
},"0.7.7": {
|
31
|
+
"A2P2": [
|
32
|
+
"catalogs : save some data retrieval until update or force request occurs",
|
29
33
|
],
|
30
34
|
},"0.7.6": {
|
31
35
|
"A2P2": [
|
@@ -7,12 +7,12 @@ a2p2/instrument.py,sha256=JI1i8vsGu1ku_3i7my278b8y8vL5Z-SF3V8XkHPSs48,732
|
|
7
7
|
a2p2/ob.py,sha256=lcSm5eXv79K6cjp0VxvxD4sSlsBTKHGbmT85XEx74lY,6268
|
8
8
|
a2p2/samp.py,sha256=DN20lWszkuuneR1BV1MBLEyoGyN8tZWvOeC5rEVLICo,3438
|
9
9
|
a2p2/utils.py,sha256=QEA9cpc2TaqXDa4yqrFiGkCl__1wV8--rVw_A-p_HM0,23833
|
10
|
-
a2p2/version.py,sha256=
|
10
|
+
a2p2/version.py,sha256=mebJf7nf4K-TQzFhN6N5xz0DL3FogdsUD2zmdxIwzrs,12910
|
11
11
|
a2p2/chara/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
12
|
a2p2/chara/facility.py,sha256=otv0UVQVYD7dE_ENojjatjld5owgM9qRm7vsAc0jyqQ,2754
|
13
13
|
a2p2/chara/gui.py,sha256=4O8u-g-UJSeqEV9CUPNflVNWIsmH0b_xf8c9huxAivs,5119
|
14
14
|
a2p2/jmmc/__init__.py,sha256=Yx8Ae77UQA_aLMzhKgWym4m2fbMR_4m77TGfaXy6I4A,187
|
15
|
-
a2p2/jmmc/catalogs.py,sha256=
|
15
|
+
a2p2/jmmc/catalogs.py,sha256=BTfG5550GOehjouFx7J_9-Ww2S8NFjQUpEwBbSoinNQ,9199
|
16
16
|
a2p2/jmmc/generated_models.py,sha256=69fmPfkCMBc0GyDeHp1rs0vkoPqOE4j0egMBWX5mB1U,11823
|
17
17
|
a2p2/jmmc/models.py,sha256=ikI8Dk-9ThkG1uHtoPJwB43tPF_YZj8M5tftIcJio7s,3776
|
18
18
|
a2p2/jmmc/services.py,sha256=kcRaRnR4COKijF5izDqqNHjKyU1j2H8PEPvbDsBUFcw,312
|
@@ -31,9 +31,9 @@ a2p2/vlti/conf/MATISSE_ditTable.json,sha256=2RQXb9UL1_VlcAAGoxqpe3nTrRfO4gyOX_IG
|
|
31
31
|
a2p2/vlti/conf/MATISSE_rangeTable.json,sha256=_j5m-EOh4bbfwdaANdh23yjgNef95AUku_uNujr9BDc,5770
|
32
32
|
a2p2/vlti/conf/PIONIER_ditTable.json,sha256=BKK7nF0nE_LOP44l_fAvAnpG8oOq5p9srcdTNQ2udKo,857
|
33
33
|
a2p2/vlti/conf/PIONIER_rangeTable.json,sha256=71Ycm2h-uBUVSAWy6lTpaBDOYwKKL5MuZH6F5ESHOI0,2113
|
34
|
-
a2p2-0.7.
|
35
|
-
a2p2-0.7.
|
36
|
-
a2p2-0.7.
|
37
|
-
a2p2-0.7.
|
38
|
-
a2p2-0.7.
|
39
|
-
a2p2-0.7.
|
34
|
+
a2p2-0.7.8.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
35
|
+
a2p2-0.7.8.dist-info/METADATA,sha256=RU21-wyWUbs1npE-so85NC_ecHLkfHNB3XsTCVwQ2_M,4188
|
36
|
+
a2p2-0.7.8.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
37
|
+
a2p2-0.7.8.dist-info/entry_points.txt,sha256=5Pq7faxs04hSEtjpqtBAlHw3cGUpvTmBugnS5PzgJMY,44
|
38
|
+
a2p2-0.7.8.dist-info/top_level.txt,sha256=lLDb6xGRyHYSbrO0EUx8vNEzTiCDtPe2z7PSbqGY4kE,5
|
39
|
+
a2p2-0.7.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|