From 02b66241d29bcd31d69209d596bbd41645fb7abb Mon Sep 17 00:00:00 2001
From: Steven Franke <s.j.franke@icloud.com>
Date: Fri, 17 Jul 2020 10:52:27 -0500
Subject: [PATCH] Add 15 minute and 30 minute TRperiod option for FST240.

---
 lib/fst240/fst240sim.f90 |  2 ++
 lib/fst240_decode.f90    | 10 ++++++++++
 2 files changed, 12 insertions(+)

diff --git a/lib/fst240/fst240sim.f90 b/lib/fst240/fst240sim.f90
index fc09a9f73..edf4fb44c 100644
--- a/lib/fst240/fst240sim.f90
+++ b/lib/fst240/fst240sim.f90
@@ -52,6 +52,8 @@ program fst240sim
    if(nsec.eq.60) nsps=3888
    if(nsec.eq.120) nsps=8200
    if(nsec.eq.300) nsps=21504
+   if(nsec.eq.900) nsps=65536
+   if(nsec.eq.1800) nsps=131072
    if(nsps.eq.0) then
       print*,'Invalid TR sequence length.'
       go to 999
diff --git a/lib/fst240_decode.f90 b/lib/fst240_decode.f90
index ca2975145..cce63ab02 100644
--- a/lib/fst240_decode.f90
+++ b/lib/fst240_decode.f90
@@ -201,6 +201,16 @@ contains
          nmax=300*12000
          ndown=512/hmod !nss=42,84,168,336
          nfft1=int((nmax-200)/ndown)*ndown
+      else if(ntrperiod.eq.900) then
+         nsps=65536
+         nmax=900*12000
+         ndown=1024/hmod !nss=64,128,256,512
+         nfft1=int((nmax-200)/ndown)*ndown
+      else if(ntrperiod.eq.1800) then
+         nsps=131072
+         nmax=1800*12000
+         ndown=2048/hmod !nss=64,128,256,512
+         nfft1=int((nmax-200)/ndown)*ndown
       end if
       nss=nsps/ndown
       fs=12000.0                       !Sample rate