NASA Logo
Ocean Color Science Software

ocssw V2022
oci_hdr_strip.py
Go to the documentation of this file.
1 # Util script to strip OCI headers off of .L0 files
2 
3 from sys import argv
4 from os import getcwd
5 
6 cwd = getcwd()
7 argc = len(argv)
8 
9 tmp_filename = cwd + "tmp.L0"
10 
11 with open(tmp_filename, "ab") as new_file:
12  for file in argv[0:]:
13  out = open(file, "rb")
14  new_file.write(out.read()[64:])
15  out.close
16  new_file.close()