process_files

astro_metadata_translator.bin.translateheader.process_files(files, regex, hdrnum, dumphdr, quiet, print_trace, outstream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>, errstream=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'>)

Read and translate metadata from the specified files.

Parameters:
files : iterable 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.

dumphdr : bool

If True dump the merged header to standard output rather than translating it.

quiet : bool

If True do not report the translated values for the file.

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. If False 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.

Returns:
okay : list of str

All the files that were processed successfully.

failed : list of str

All the files that could not be processed.