Background réaliste CsI(Tl) + hybridation mesuré/synthétique + dashboard continuum
- Remplace le continuum exponentiel par un modèle réaliste CsI(Tl) dans l'entraînement (bosse asymétrique ~110 keV + queue Compton) - Ajoute l'injection de background mesuré (70% mesuré / 30% synthétique) via --measured_background et MEASURED_BACKGROUND_PATH - Ajoute l'endpoint /api/background/continuum et le toggle "Continuum CsI" sur le dashboard background - Exclut le canal 1023 (overflow bin) de l'affichage web (NUM_CHANNELS=1023) - Corrige le lissage Gaussien du background (normalisation locale aux bords) - Met à jour README.md, CLAUDE.md, TUTORIEL.md, TOTO.md, vega_ml/README.md Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@ -405,6 +405,7 @@ def generate_single_sample(args: Tuple[int, dict]) -> Optional[str]:
|
||||
include_radon=bg_params['include_radon'],
|
||||
include_thorium=bg_params['include_thorium'],
|
||||
detector_name=config['detector_name'],
|
||||
measured_background_path=config.get('measured_background_path'),
|
||||
)
|
||||
|
||||
# Generate spectrum
|
||||
@ -437,6 +438,7 @@ def generate_training_data_v3(
|
||||
scenarios: Optional[List[SampleScenario]] = None,
|
||||
num_workers: int = None,
|
||||
random_seed: int = None,
|
||||
measured_background_path: Optional[str] = None,
|
||||
) -> int:
|
||||
"""
|
||||
Generate training samples in parallel.
|
||||
@ -498,6 +500,7 @@ def generate_training_data_v3(
|
||||
'bg_intensity_max': bg_intensity_range[1],
|
||||
'base_seed': random_seed,
|
||||
'scenarios': scenarios,
|
||||
'measured_background_path': measured_background_path,
|
||||
}
|
||||
|
||||
# Create work items
|
||||
@ -560,9 +563,11 @@ def main():
|
||||
help='Minimum activity in Bq')
|
||||
parser.add_argument('--activity_max', type=float, default=100.0,
|
||||
help='Maximum activity in Bq')
|
||||
|
||||
parser.add_argument('--measured_background', type=str, default=None,
|
||||
help='Path to measured background .npy file for hybrid training')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
generate_training_data_v3(
|
||||
num_samples=args.num_samples,
|
||||
output_dir=Path(args.output_dir),
|
||||
@ -570,6 +575,7 @@ def main():
|
||||
activity_range=(args.activity_min, args.activity_max),
|
||||
num_workers=args.workers,
|
||||
random_seed=args.seed,
|
||||
measured_background_path=args.measured_background,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user