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
Zhang Xin
star_SED
Commits
059aa298
Commit
059aa298
authored
May 07, 2025
by
Zhang Xin
Browse files
update merge code
parent
f4f7dff5
Changes
1
Show whitespace changes
Inline
Side-by-side
mergeFiles.py
View file @
059aa298
import
numpy
as
np
import
os
from
astropy.table
import
Table
import
sys
multiFileDir
=
'/nfsdata/share/CSSOSDataProductsSims/C10_refCat/1/'
if
len
(
sys
.
argv
)
<
3
:
# print('usage:\n'+sys.argv[0]+' survey_result.txt')
sys
.
exit
(
0
)
multiFileDir
=
str
(
sys
.
argv
[
1
])
outDir
=
str
(
sys
.
argv
[
2
])
# multiFileDir = '/nfsdata/share/CSSOSDataProductsSims/C10_refCat/1/'
mergeKeys
=
[
'parallax1'
,
...
...
@@ -51,7 +58,7 @@ for fn in allFiles:
for
key
in
mergeKeys
:
mergeTable
[
key
]
=
mergeTable
[
key
]
+
tTab
[
key
]
mergeTable
.
write
(
outFn
,
overwrite
=
True
)
mergeTable
.
write
(
os
.
path
.
join
(
outDir
,
outFn
)
,
overwrite
=
True
)
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