dspsr折叠脚本(自存)

点击查看代码
#!/bin/bash

FILENAME=$(basename "$PWD")
LABELS=("A" "B" "D" "E")

total_start=$(date +%s)

for LABEL in "${LABELS[@]}"; do
    echo "Running dspsr for source ${LABEL}..."

    start_time=$(date +%s)

    dspsr -E "2129+1210${LABEL}-fin.par" -b 1024 -L 60 -t 20 -O "M15${LABEL}-${FILENAME}" *.fits

    OUTPUT_DIR="M15${LABEL}-${FILENAME}"
    mkdir -p "$OUTPUT_DIR"
    mv *.ar "$OUTPUT_DIR/"

    end_time=$(date +%s)
    elapsed=$((end_time - start_time))
    echo "Finished M15${LABEL}-${FILENAME} in ${elapsed} seconds."
    echo
done

total_end=$(date +%s)
total_elapsed=$((total_end - total_start))

echo "All tasks completed in ${total_elapsed} seconds."
posted @ 2025-06-23 18:04  AmeryWMW  阅读(18)  评论(0)    收藏  举报