process_files¶
- astro_metadata_translator.bin.translateheader.process_files(files: ~typing.Sequence[str], regex: str, hdrnum: int, print_trace: bool, outstream: ~typing.IO = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, errstream: ~typing.IO = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, output_mode: str = 'auto') Tuple[List[str], List[str]] ¶
Read and translate metadata from the specified files.
- Parameters:
- filesiterable of
str
The files or directories from which the headers are to be read.
- regex
str
Regular expression string used to filter files when a directory is scanned.
- hdrnum
int
The HDU number to read. The primary header is always read and merged with the header from this HDU.
- print_trace
bool
If there is an error reading the file and this parameter is
True
, a full traceback of the exception will be reported. IfFalse
prints a one line summary of the error condition.- outstream
io.StringIO
, optional Output stream to use for standard messages. Defaults to
sys.stdout
.- errstream
io.StringIO
, optional Stream to send messages that would normally be sent to standard error. Defaults to
sys.stderr
.- output_mode
str
, optional Output mode to use for the translated information. “auto” switches based on how many files are found.
- filesiterable of
- Returns: