Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-dfs
csst-dfs-api-cluster
Commits
2d128fe8
Commit
2d128fe8
authored
Jan 04, 2023
by
Wei Shoulin
Browse files
bytes
parent
7eb699f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
csst_dfs_api_cluster/common/catalog.py
View file @
2d128fe8
...
...
@@ -28,7 +28,7 @@ class CatalogApi(object):
return: csst_dfs_common.models.Result
'''
try
:
datas
=
b
ytearray
()
datas
=
b
''
totalCount
=
0
for
resp
in
self
.
stub
.
Gaia3Search
(
ephem_pb2
.
EphemSearchRequest
(
ra
=
ra
,
...
...
@@ -41,8 +41,7 @@ class CatalogApi(object):
),
metadata
=
get_auth_headers
()):
if
resp
.
success
:
# data = from_proto_model_list(Gaia3Record, resp.records)
data
=
resp
.
records
datas
.
extend
(
data
)
datas
=
datas
+
resp
.
records
totalCount
=
resp
.
totalCount
else
:
return
Result
.
error
(
message
=
str
(
resp
.
error
.
detail
))
...
...
@@ -50,164 +49,164 @@ class CatalogApi(object):
records
=
pickle
.
loads
(
datas
)
ret_records2
=
[]
for
r
in
records
:
rec
=
Gaia3Record
(
SolutionId
=
r
[
0
]
,
Designation
=
r
[
1
]
,
SourceId
=
r
[
2
]
,
RandomIndex
=
r
[
3
]
,
RefEpoch
=
r
[
4
]
,
Ra
=
r
[
5
]
,
RaError
=
r
[
6
]
,
Dec
=
r
[
7
]
,
DecError
=
r
[
8
]
,
Parallax
=
r
[
9
]
,
ParallaxError
=
r
[
10
]
,
ParallaxOverError
=
r
[
11
]
,
Pm
=
r
[
12
]
,
Pmra
=
r
[
13
]
,
PmraError
=
r
[
14
]
,
Pmdec
=
r
[
15
]
,
PmdecError
=
r
[
16
]
,
RaDecCorr
=
r
[
17
]
,
RaParallaxCorr
=
r
[
18
]
,
RaPmraCorr
=
r
[
19
]
,
RaPmdecCorr
=
r
[
20
]
,
DecParallaxCorr
=
r
[
21
]
,
DecPmraCorr
=
r
[
22
]
,
DecPmdecCorr
=
r
[
23
]
,
ParallaxPmraCorr
=
r
[
24
]
,
ParallaxPmdecCorr
=
r
[
25
]
,
PmraPmdecCorr
=
r
[
26
]
,
AstrometricNObsAl
=
r
[
27
]
,
AstrometricNObsAc
=
r
[
28
]
,
AstrometricNGoodObsAl
=
r
[
29
]
,
AstrometricNBadObsAl
=
r
[
30
]
,
AstrometricGofAl
=
r
[
31
]
,
AstrometricChi2Al
=
r
[
32
]
,
AstrometricExcessNoise
=
r
[
33
]
,
AstrometricExcessNoiseSig
=
r
[
34
]
,
AstrometricParamsSolved
=
r
[
35
]
,
AstrometricPrimaryFlag
=
r
[
36
]
,
NuEffUsedInAstrometry
=
r
[
37
]
,
Pseudocolour
=
r
[
38
]
,
PseudocolourError
=
r
[
39
]
,
RaPseudocolourCorr
=
r
[
40
]
,
DecPseudocolourCorr
=
r
[
41
]
,
ParallaxPseudocolourCorr
=
r
[
42
]
,
PmraPseudocolourCorr
=
r
[
43
]
,
PmdecPseudocolourCorr
=
r
[
44
]
,
AstrometricMatchedTransits
=
r
[
45
]
,
VisibilityPeriodsUsed
=
r
[
46
]
,
AstrometricSigma5dMax
=
r
[
47
]
,
MatchedTransits
=
r
[
48
]
,
NewMatchedTransits
=
r
[
49
]
,
MatchedTransitsRemoved
=
r
[
50
]
,
IpdGofHarmonicAmplitude
=
r
[
51
]
,
IpdGofHarmonicPhase
=
r
[
52
]
,
IpdFracMultiPeak
=
r
[
53
]
,
IpdFracOddWin
=
r
[
54
]
,
Ruwe
=
r
[
55
]
,
ScanDirectionStrengthK1
=
r
[
56
]
,
ScanDirectionStrengthK2
=
r
[
57
]
,
ScanDirectionStrengthK3
=
r
[
58
]
,
ScanDirectionStrengthK4
=
r
[
59
]
,
ScanDirectionMeanK1
=
r
[
60
]
,
ScanDirectionMeanK2
=
r
[
61
]
,
ScanDirectionMeanK3
=
r
[
62
]
,
ScanDirectionMeanK4
=
r
[
63
]
,
DuplicatedSource
=
r
[
64
]
,
PhotGNObs
=
r
[
65
]
,
PhotGMeanFlux
=
r
[
66
]
,
PhotGMeanFluxError
=
r
[
67
]
,
PhotGMeanFluxOverError
=
r
[
68
]
,
PhotGMeanMag
=
r
[
69
]
,
PhotBpNObs
=
r
[
70
]
,
PhotBpMeanFlux
=
r
[
71
]
,
PhotBpMeanFluxError
=
r
[
72
]
,
PhotBpMeanFluxOverError
=
r
[
73
]
,
PhotBpMeanMag
=
r
[
74
]
,
PhotRpNObs
=
r
[
75
]
,
PhotRpMeanFlux
=
r
[
76
]
,
PhotRpMeanFluxError
=
r
[
77
]
,
PhotRpMeanFluxOverError
=
r
[
78
]
,
PhotRpMeanMag
=
r
[
79
]
,
PhotBpRpExcessFactor
=
r
[
80
]
,
PhotBpNContaminatedTransits
=
r
[
81
]
,
PhotBpNBlendedTransits
=
r
[
82
]
,
PhotRpNContaminatedTransits
=
r
[
83
]
,
PhotRpNBlendedTransits
=
r
[
84
]
,
PhotProcMode
=
r
[
85
]
,
BpRp
=
r
[
86
]
,
BpG
=
r
[
87
]
,
GRp
=
r
[
88
]
,
RadialVelocity
=
r
[
89
]
,
RadialVelocityError
=
r
[
90
]
,
RvMethodUsed
=
r
[
91
]
,
RvNbTransits
=
r
[
92
]
,
RvNbDeblendedTransits
=
r
[
93
]
,
RvVisibilityPeriodsUsed
=
r
[
94
]
,
RvExpectedSigToNoise
=
r
[
95
]
,
RvRenormalisedGof
=
r
[
96
]
,
RvChisqPvalue
=
r
[
97
]
,
RvTimeDuration
=
r
[
98
]
,
RvAmplitudeRobust
=
r
[
99
]
,
RvTemplateTeff
=
r
[
100
]
,
RvTemplateLogg
=
r
[
101
]
,
RvTemplateFeH
=
r
[
102
]
,
RvAtmParamOrigin
=
r
[
103
]
,
Vbroad
=
r
[
104
]
,
VbroadError
=
r
[
105
]
,
VbroadNbTransits
=
r
[
106
]
,
GrvsMag
=
r
[
107
]
,
GrvsMagError
=
r
[
108
]
,
GrvsMagNbTransits
=
r
[
109
]
,
RvsSpecSigToNoise
=
r
[
110
]
,
PhotVariableFlag
=
r
[
111
]
,
L
=
r
[
112
]
,
B
=
r
[
113
]
,
EclLon
=
r
[
114
]
,
EclLat
=
r
[
115
]
,
InQsoCandidates
=
r
[
116
]
,
InGalaxyCandidates
=
r
[
117
]
,
NonSingleStar
=
r
[
118
]
,
HasXpContinuous
=
r
[
119
]
,
HasXpSampled
=
r
[
120
]
,
HasRvs
=
r
[
121
]
,
HasEpochPhotometry
=
r
[
122
]
,
HasEpochRv
=
r
[
123
]
,
HasMcmcGspphot
=
r
[
124
]
,
HasMcmcMsc
=
r
[
125
]
,
InAndromedaSurvey
=
r
[
126
]
,
ClassprobDscCombmodQuasar
=
r
[
127
]
,
ClassprobDscCombmodGalaxy
=
r
[
128
]
,
ClassprobDscCombmodStar
=
r
[
129
]
,
TeffGspphot
=
r
[
130
]
,
TeffGspphotLower
=
r
[
131
]
,
TeffGspphotUpper
=
r
[
132
]
,
LoggGspphot
=
r
[
133
]
,
LoggGspphotLower
=
r
[
134
]
,
LoggGspphotUpper
=
r
[
135
]
,
MhGspphot
=
r
[
136
]
,
MhGspphotLower
=
r
[
137
]
,
MhGspphotUpper
=
r
[
138
]
,
DistanceGspphot
=
r
[
139
]
,
DistanceGspphotLower
=
r
[
140
]
,
DistanceGspphotUpper
=
r
[
141
]
,
AzeroGspphot
=
r
[
142
]
,
AzeroGspphotLower
=
r
[
143
]
,
AzeroGspphotUpper
=
r
[
144
]
,
AgGspphot
=
r
[
145
]
,
AgGspphotLower
=
r
[
146
]
,
AgGspphotUpper
=
r
[
147
]
,
EbpminrpGspphot
=
r
[
148
]
,
EbpminrpGspphotLower
=
r
[
149
]
,
EbpminrpGspphotUpper
=
r
[
150
]
,
LibnameGspphot
=
r
[
151
]
,
NS8HIdx
=
r
[
152
]
,
NS16HIdx
=
r
[
153
]
,
NS32HIdx
=
r
[
154
]
,
NS64HIdx
=
r
[
155
]
,
FileIdx
=
r
[
156
]
)
rec
=
Gaia3Record
(
)
rec
.
SolutionId
=
r
[
0
]
rec
.
Designation
=
r
[
1
]
rec
.
SourceId
=
r
[
2
]
rec
.
RandomIndex
=
r
[
3
]
rec
.
RefEpoch
=
r
[
4
]
rec
.
Ra
=
r
[
5
]
rec
.
RaError
=
r
[
6
]
rec
.
Dec
=
r
[
7
]
rec
.
DecError
=
r
[
8
]
rec
.
Parallax
=
r
[
9
]
rec
.
ParallaxError
=
r
[
10
]
rec
.
ParallaxOverError
=
r
[
11
]
rec
.
Pm
=
r
[
12
]
rec
.
Pmra
=
r
[
13
]
rec
.
PmraError
=
r
[
14
]
rec
.
Pmdec
=
r
[
15
]
rec
.
PmdecError
=
r
[
16
]
rec
.
RaDecCorr
=
r
[
17
]
rec
.
RaParallaxCorr
=
r
[
18
]
rec
.
RaPmraCorr
=
r
[
19
]
rec
.
RaPmdecCorr
=
r
[
20
]
rec
.
DecParallaxCorr
=
r
[
21
]
rec
.
DecPmraCorr
=
r
[
22
]
rec
.
DecPmdecCorr
=
r
[
23
]
rec
.
ParallaxPmraCorr
=
r
[
24
]
rec
.
ParallaxPmdecCorr
=
r
[
25
]
rec
.
PmraPmdecCorr
=
r
[
26
]
rec
.
AstrometricNObsAl
=
r
[
27
]
rec
.
AstrometricNObsAc
=
r
[
28
]
rec
.
AstrometricNGoodObsAl
=
r
[
29
]
rec
.
AstrometricNBadObsAl
=
r
[
30
]
rec
.
AstrometricGofAl
=
r
[
31
]
rec
.
AstrometricChi2Al
=
r
[
32
]
rec
.
AstrometricExcessNoise
=
r
[
33
]
rec
.
AstrometricExcessNoiseSig
=
r
[
34
]
rec
.
AstrometricParamsSolved
=
r
[
35
]
rec
.
AstrometricPrimaryFlag
=
r
[
36
]
rec
.
NuEffUsedInAstrometry
=
r
[
37
]
rec
.
Pseudocolour
=
r
[
38
]
rec
.
PseudocolourError
=
r
[
39
]
rec
.
RaPseudocolourCorr
=
r
[
40
]
rec
.
DecPseudocolourCorr
=
r
[
41
]
rec
.
ParallaxPseudocolourCorr
=
r
[
42
]
rec
.
PmraPseudocolourCorr
=
r
[
43
]
rec
.
PmdecPseudocolourCorr
=
r
[
44
]
rec
.
AstrometricMatchedTransits
=
r
[
45
]
rec
.
VisibilityPeriodsUsed
=
r
[
46
]
rec
.
AstrometricSigma5dMax
=
r
[
47
]
rec
.
MatchedTransits
=
r
[
48
]
rec
.
NewMatchedTransits
=
r
[
49
]
rec
.
MatchedTransitsRemoved
=
r
[
50
]
rec
.
IpdGofHarmonicAmplitude
=
r
[
51
]
rec
.
IpdGofHarmonicPhase
=
r
[
52
]
rec
.
IpdFracMultiPeak
=
r
[
53
]
rec
.
IpdFracOddWin
=
r
[
54
]
rec
.
Ruwe
=
r
[
55
]
rec
.
ScanDirectionStrengthK1
=
r
[
56
]
rec
.
ScanDirectionStrengthK2
=
r
[
57
]
rec
.
ScanDirectionStrengthK3
=
r
[
58
]
rec
.
ScanDirectionStrengthK4
=
r
[
59
]
rec
.
ScanDirectionMeanK1
=
r
[
60
]
rec
.
ScanDirectionMeanK2
=
r
[
61
]
rec
.
ScanDirectionMeanK3
=
r
[
62
]
rec
.
ScanDirectionMeanK4
=
r
[
63
]
rec
.
DuplicatedSource
=
r
[
64
]
rec
.
PhotGNObs
=
r
[
65
]
rec
.
PhotGMeanFlux
=
r
[
66
]
rec
.
PhotGMeanFluxError
=
r
[
67
]
rec
.
PhotGMeanFluxOverError
=
r
[
68
]
rec
.
PhotGMeanMag
=
r
[
69
]
rec
.
PhotBpNObs
=
r
[
70
]
rec
.
PhotBpMeanFlux
=
r
[
71
]
rec
.
PhotBpMeanFluxError
=
r
[
72
]
rec
.
PhotBpMeanFluxOverError
=
r
[
73
]
rec
.
PhotBpMeanMag
=
r
[
74
]
rec
.
PhotRpNObs
=
r
[
75
]
rec
.
PhotRpMeanFlux
=
r
[
76
]
rec
.
PhotRpMeanFluxError
=
r
[
77
]
rec
.
PhotRpMeanFluxOverError
=
r
[
78
]
rec
.
PhotRpMeanMag
=
r
[
79
]
rec
.
PhotBpRpExcessFactor
=
r
[
80
]
rec
.
PhotBpNContaminatedTransits
=
r
[
81
]
rec
.
PhotBpNBlendedTransits
=
r
[
82
]
rec
.
PhotRpNContaminatedTransits
=
r
[
83
]
rec
.
PhotRpNBlendedTransits
=
r
[
84
]
rec
.
PhotProcMode
=
r
[
85
]
rec
.
BpRp
=
r
[
86
]
rec
.
BpG
=
r
[
87
]
rec
.
GRp
=
r
[
88
]
rec
.
RadialVelocity
=
r
[
89
]
rec
.
RadialVelocityError
=
r
[
90
]
rec
.
RvMethodUsed
=
r
[
91
]
rec
.
RvNbTransits
=
r
[
92
]
rec
.
RvNbDeblendedTransits
=
r
[
93
]
rec
.
RvVisibilityPeriodsUsed
=
r
[
94
]
rec
.
RvExpectedSigToNoise
=
r
[
95
]
rec
.
RvRenormalisedGof
=
r
[
96
]
rec
.
RvChisqPvalue
=
r
[
97
]
rec
.
RvTimeDuration
=
r
[
98
]
rec
.
RvAmplitudeRobust
=
r
[
99
]
rec
.
RvTemplateTeff
=
r
[
100
]
rec
.
RvTemplateLogg
=
r
[
101
]
rec
.
RvTemplateFeH
=
r
[
102
]
rec
.
RvAtmParamOrigin
=
r
[
103
]
rec
.
Vbroad
=
r
[
104
]
rec
.
VbroadError
=
r
[
105
]
rec
.
VbroadNbTransits
=
r
[
106
]
rec
.
GrvsMag
=
r
[
107
]
rec
.
GrvsMagError
=
r
[
108
]
rec
.
GrvsMagNbTransits
=
r
[
109
]
rec
.
RvsSpecSigToNoise
=
r
[
110
]
rec
.
PhotVariableFlag
=
r
[
111
]
rec
.
L
=
r
[
112
]
rec
.
B
=
r
[
113
]
rec
.
EclLon
=
r
[
114
]
rec
.
EclLat
=
r
[
115
]
rec
.
InQsoCandidates
=
r
[
116
]
rec
.
InGalaxyCandidates
=
r
[
117
]
rec
.
NonSingleStar
=
r
[
118
]
rec
.
HasXpContinuous
=
r
[
119
]
rec
.
HasXpSampled
=
r
[
120
]
rec
.
HasRvs
=
r
[
121
]
rec
.
HasEpochPhotometry
=
r
[
122
]
rec
.
HasEpochRv
=
r
[
123
]
rec
.
HasMcmcGspphot
=
r
[
124
]
rec
.
HasMcmcMsc
=
r
[
125
]
rec
.
InAndromedaSurvey
=
r
[
126
]
rec
.
ClassprobDscCombmodQuasar
=
r
[
127
]
rec
.
ClassprobDscCombmodGalaxy
=
r
[
128
]
rec
.
ClassprobDscCombmodStar
=
r
[
129
]
rec
.
TeffGspphot
=
r
[
130
]
rec
.
TeffGspphotLower
=
r
[
131
]
rec
.
TeffGspphotUpper
=
r
[
132
]
rec
.
LoggGspphot
=
r
[
133
]
rec
.
LoggGspphotLower
=
r
[
134
]
rec
.
LoggGspphotUpper
=
r
[
135
]
rec
.
MhGspphot
=
r
[
136
]
rec
.
MhGspphotLower
=
r
[
137
]
rec
.
MhGspphotUpper
=
r
[
138
]
rec
.
DistanceGspphot
=
r
[
139
]
rec
.
DistanceGspphotLower
=
r
[
140
]
rec
.
DistanceGspphotUpper
=
r
[
141
]
rec
.
AzeroGspphot
=
r
[
142
]
rec
.
AzeroGspphotLower
=
r
[
143
]
rec
.
AzeroGspphotUpper
=
r
[
144
]
rec
.
AgGspphot
=
r
[
145
]
rec
.
AgGspphotLower
=
r
[
146
]
rec
.
AgGspphotUpper
=
r
[
147
]
rec
.
EbpminrpGspphot
=
r
[
148
]
rec
.
EbpminrpGspphotLower
=
r
[
149
]
rec
.
EbpminrpGspphotUpper
=
r
[
150
]
rec
.
LibnameGspphot
=
r
[
151
]
rec
.
NS8HIdx
=
r
[
152
]
rec
.
NS16HIdx
=
r
[
153
]
rec
.
NS32HIdx
=
r
[
154
]
rec
.
NS64HIdx
=
r
[
155
]
rec
.
FileIdx
=
r
[
156
]
ret_records2
.
append
(
rec
)
return
Result
.
ok_data
(
data
=
ret_records2
).
append
(
"totalCount"
,
totalCount
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment