Details
-
Type:
Story
-
Status: Won't Fix
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: validate_drp
-
Labels:None
-
Team:DM Science
Description
When the output of validate_drp print_metrics is captured by a log file, e.g., from STDOUT, the control characters that change the colors for interactive terminal use get stored as escape sequences. This makes the log file annoying to read.
Either:
1. Change default behavior to not print with colors
2. Make it "smart" to detect whether it's writing to terminal or stdout (this seems like a potential rabbit hole, but maybe there's a simple solution).
Example snippet:
[...]
|
Photometric scatter (median) - SNR > 100.0 : 11.5 mmag
|
Median value of the astrometric scatter - all magnitudes: 57.686 marcsec
|
Astrometric scatter (median) - snr > 100.0 : 10.1 marcsec
|
No stars found that are 199.0 arcmin--201.0 arcmin apart.
|
ESC[1mESC[95m=================================================================ESC[0m
|
ESC[1mESC[95mr band metric measurementsESC[0m
|
ESC[1mESC[95m=================================================================ESC[0m
|
ESC[95mPA1 - LPM-17, p. 21, http://ls.st/lpm-17
|
ESC[0mThe maximum rms of the unresolved source magnitude
|
distribution around the mean value (repeatability).
|
[...]
|
Ah, that's interesting. I like option 1, especially given that this code will be moving to verify (I realize that verify only has notebook-based reporting; a console printout is needed too.)