HOME ESR EXPERIMENTS LABS etc
E121 E127 E132 E125 E143 laser_cooling_2021 E142 Ê128 E146 E0052 E0018 E0028 E0038 E0075 E0203_E0018
  masses & isomeres 2025  Not logged in ELOG logo
Message ID: 6     Entry time: Mon Mar 31 10:46:43 2025
Author: Ruijiu Chen 
Category: Analysis 
Subject: This program is used to combine spectrum which is recored by RSA into one spectrum. 
This program is used to combine spectrum of many injections into one spectrum.

Example of usage:

(pyroot) gpuuser@appc256:/data.local/G22-00018_00203/scripts/OnlineDataAnalysisSystem/shift/20250331/data$ bash generate_data.sh /data.local/G22-00018_00203/results/analyzers/RSA01 RSA01- 
'*.tiq_spectrogram.npz' 2025.04.01.04.00.00.000 2025.04.01.19.00.00.000 0.001 408590000 408620000 0.3
Attachment 1: generate_data_1.sh  934 Bytes  Uploaded Mon Mar 31 11:47:58 2025  | Hide | Hide all
#!/bin/bash

# Check if the correct number of arguments are provided
if [ "$#" -ne 6 ]; then
    echo "Usage: $0 <dir> <prefix> <pattern> <start_time> <end_time> <value1>"
    echo "Example: sh generate_data.sh /lustre/astrum/experiment_data/2024-05_E018/rsa_processor_online/RSA02/tiq RSA02- '*.tiq' 2024.05.15.13.10.00.000 2024.05.15.13.11.00.000 0.001"
    exit 1
fi

# Assign arguments to variables
dir=$1
prefix=$2
pattern=$3
start_time=$4
end_time=$5
value1=$6

# Print the variables
echo "Directory: $dir"
echo "Prefix: $prefix"
echo "Pattern: $pattern"
echo "Start time: $start_time"
echo "End time: $end_time"
echo "Value 1: $value1"

# Create and change to a new directory named after the time range
mkdir "${start_time}_${end_time}"
cd "${start_time}_${end_time}"

# Call the combine_injection command with the provided arguments
combine_injection accumulate "$dir" "$prefix" "$pattern" "$start_time" "$end_time" "$value1"
ELOG V3.1.5-fc6679b