demiangomez / Parallel.GAMIT

Python wrapper to parallelize GAMIT executions
BSD 3-Clause "New" or "Revised" License
36 stars 17 forks source link

pyArchiveStruct.scan_archive_struct needs a better filename check #15

Closed demiangomez closed 6 years ago

demiangomez commented 6 years ago

The check if file.endswith("d.Z"): needs to be improved to avoid problems with files named old.Z, since condition now lets this type of file pass. A regular expression should be used to guarantee that the filename has the form stnmddd.yyd.Z

demiangomez commented 6 years ago

Done. Added two functions to pyArchiveStruct, parse_crinex_filename and parse_rinex_filename that use re.findall. These are now used by pyArchiveStruct.scan_archive_struct. Other instances where rinex filenames are validates will be later changed to use this function.