From 919a6f4c257edb6b851bd0a94fa1483303f0666e Mon Sep 17 00:00:00 2001
From: Patrick Godwin <patrick.godwin@ligo.org>
Date: Fri, 11 Jun 2021 13:05:53 -0700
Subject: [PATCH] tweak user guide sections, fill out minimal PSD estimation
 guide

---
 doc/source/fake_data.rst       |  6 ----
 doc/source/index.rst           |  4 +--
 doc/source/psd_estimation.rst  | 57 +++++++++++++++++++++++++++++++++-
 doc/source/simulated_data.rst  |  6 ++++
 doc/source/workflow_config.rst |  6 ++++
 5 files changed, 70 insertions(+), 9 deletions(-)
 delete mode 100644 doc/source/fake_data.rst
 create mode 100644 doc/source/simulated_data.rst
 create mode 100644 doc/source/workflow_config.rst

diff --git a/doc/source/fake_data.rst b/doc/source/fake_data.rst
deleted file mode 100644
index a72cf95cf0..0000000000
--- a/doc/source/fake_data.rst
+++ /dev/null
@@ -1,6 +0,0 @@
-.. _fake-data:
-
-Fake Data Generation
-=========================
-
-WRITEME
diff --git a/doc/source/index.rst b/doc/source/index.rst
index c46db0e1e3..9aad63ad62 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -34,9 +34,9 @@ The GstLAL software package is used for the following activities:
     :maxdepth: 2
 
     cbc_analysis
-    feature_extraction
-    fake_data
     psd_estimation
+    simulated_data
+    workflow_config
     publications
 
 .. toctree::
diff --git a/doc/source/psd_estimation.rst b/doc/source/psd_estimation.rst
index feea6886f2..4a11d3764f 100644
--- a/doc/source/psd_estimation.rst
+++ b/doc/source/psd_estimation.rst
@@ -3,4 +3,59 @@
 PSD Generation
 ================
 
-WRITEME
+Using this workflow configuration (``config.yml``), we can generate a
+median-averaged PSD across 100000 seconds of Hanford and Livingston data in O2:
+
+.. code:: bash
+
+  # general options
+  start: 1187000000
+  stop: 1187100000
+  ifos: H1L1
+  
+  # data discovery options
+  source:
+    frame-type:
+      H1: H1_GWOSC_O2_16KHZ_R1
+      L1: L1_GWOSC_O2_16KHZ_R1
+    channel-name:
+      H1: GWOSC-16KHZ_R1_STRAIN
+      L1: GWOSC-16KHZ_R1_STRAIN
+    sample-rate: 4096
+    frame-segments-file: segments.xml.gz
+    frame-segments-name: datasegments
+  
+  # psd options
+  psd:
+    fft-length: 8
+    sample-rate: 4096
+  
+  # condor options
+  condor:
+    accounting-group: your.accounting.group
+    profile: ldas
+
+
+This sets general options such as the start and end times and the detectors to
+analyze (H1 and L1). Data discovery options specify how to retrieve the strain
+data as well as specifying the file used for science segments (``segments.xml.gz``),
+and the sampling rate. PSD-specific options such as the FFT stride used.
+
+Finally,
+workflow-specific options (via HTCondor) which specify options like the accounting group
+and the grid profile to use. If you have not done so yet, you can install grid profiles
+locally and check which grid profiles are currently available via:
+
+.. code:: bash
+
+  $ gstlal_grid_profile install
+  $ gstlal_grid_profile list  # ldas should show up as one of the possible options
+
+
+To launch the workflow via Condor with the configuration above, run:
+
+.. code:: bash
+
+  $ gstlal_query_gwosc_segments 1187000000 1187100000 H1L1
+  $ gstlal_psd_workflow -c config.yml
+  $ condor_submit_dag psd_dag.dag
diff --git a/doc/source/simulated_data.rst b/doc/source/simulated_data.rst
new file mode 100644
index 0000000000..5c59d5ff28
--- /dev/null
+++ b/doc/source/simulated_data.rst
@@ -0,0 +1,6 @@
+.. _simulated-data:
+
+Simulated Data Generation
+=========================
+
+WRITEME
diff --git a/doc/source/workflow_config.rst b/doc/source/workflow_config.rst
new file mode 100644
index 0000000000..2dd58d9ce7
--- /dev/null
+++ b/doc/source/workflow_config.rst
@@ -0,0 +1,6 @@
+.. _workflow-config:
+
+Workflow Configuration
+=======================
+
+WRITEME
-- 
GitLab