From e826b58dbe9889db726bf523efddb8bd7d707db8 Mon Sep 17 00:00:00 2001 From: Michael Galloy Date: Wed, 31 Jan 2024 16:22:47 -0700 Subject: [PATCH] Make center guess code more generic for #145 (and #105) --- src/level1/comp_find_flat_initial_guess.pro | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/level1/comp_find_flat_initial_guess.pro b/src/level1/comp_find_flat_initial_guess.pro index 5a886f5..3abdc9c 100644 --- a/src/level1/comp_find_flat_initial_guess.pro +++ b/src/level1/comp_find_flat_initial_guess.pro @@ -19,9 +19,11 @@ function comp_find_flat_initial_guess, flat compile_opt strictarr @comp_constants_common - ; TODO: this threshold should be a function of wave_type (this might be an - ; issue for 1083, but not 1074 or 1079) - threshold = 250.0 + ; threshold of 250.0 works well for 250.0 ms data for 1074 nm and 1079 nm + ; in 2012 and later + ; threshold = 250.0 + + threshold = 20.0 * median(flat) ; mask flat into various in/out of annuli connected regions lr = label_region(flat lt threshold)