# bjowen/drill_public architecture

> Architecture diagram of the GitHub repository bjowen/drill_public, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bjowen/drill_public
- Repository: https://github.com/bjowen/drill_public

## Overview

Drill is a pipeline for deep, directed continuous-gravitational-wave searches of isolated neutron stars. The documented entry point is `code/Drill.sh`; target/configuration and SFT preparation lead to frequency-band search jobs, statistical review and candidate follow-up, then upper-limit estimation, injection validation, and sensitivity-depth reporting. The graph preserves these distinct stages and the shared XML/job utilities. Several scripts are unsampled, so their roles are inferred from their names and the documented workflow; uncertain internal dispatch links are omitted.

Main entry points: [`code/SetupSearch.py`](https://github.com/bjowen/drill_public/blob/main/code/SetupSearch.py) (Search planning), [`code/Drill.sh`](https://github.com/bjowen/drill_public/blob/main/code/Drill.sh) (Pipeline entry), [`code/ScanRunPre.py`](https://github.com/bjowen/drill_public/blob/main/code/ScanRunPre.py) (SFT preparation), [`code/ResearchPre.py`](https://github.com/bjowen/drill_public/blob/main/code/ResearchPre.py) (Candidate selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Preparation"]
  node_drill["Pipeline entry<br/>[Drill.sh]"]
  node_targets["Target parsing<br/>[ParseTargets.py]"]
  node_scanpre["SFT preparation<br/>[ScanRunPre.py]"]
  node_scan["SFT scanning<br/>[ScanRun.py]"]
end

subgraph group_search["Search"]
  node_setupsearch["Search planning<br/>[SetupSearch.py]"]
  node_searchrun["Band search<br/>[Search.py]"]
end

subgraph group_followup["Review and follow-up"]
  node_searchpost["Search collation<br/>[SearchPost.py]"]
  node_researchpre["Candidate selection<br/>[ResearchPre.py]"]
  node_research["Candidate follow-up<br/>[Research.py]"]
  node_plot["Result plots<br/>[PlotUpperLimits.py]"]
end

subgraph group_limits["Upper limits"]
  node_ulpre["Limit preparation<br/>[UpperLimitPre.py]"]
  node_ulcalc["Limit estimation<br/>[UpperLimit.py]"]
  node_inj["Signal injections"]
  node_injpost["Injection validation"]
  node_ulpost["Limit collation<br/>[UpperLimitPost.py]"]
  node_depth["Sensitivity depth"]
end

subgraph group_runtime["Shared runtime"]
  node_bits["Pipeline utilities<br/>[DrillBits.py]"]
end

node_user(("Researcher"))
node_config["Search configuration<br/>[config.xml]"]
node_sfts[("SFT data")]
node_lal["LALSuite tools"]
node_slurm["Slurm scheduler"]

node_user -->|"runs"| node_drill
node_drill -->|"dispatches"| node_targets
node_drill -->|"dispatches"| node_scanpre
node_drill -->|"dispatches"| node_setupsearch
node_targets -->|"reads"| node_config
node_scanpre -->|"reads"| node_config
node_scanpre -->|"links"| node_sfts
node_scanpre -->|"submits"| node_slurm
node_scanpre -->|"submits"| node_scan
node_setupsearch -->|"reads"| node_config
node_setupsearch -->|"reads"| node_sfts
node_setupsearch -->|"invokes"| node_lal
node_setupsearch -->|"submits"| node_slurm
node_setupsearch -->|"schedules"| node_searchrun
node_searchrun -->|"reads"| node_config
node_searchrun -->|"invokes"| node_lal
node_searchpost -->|"produces results for"| node_researchpre
node_researchpre -->|"prepares reruns"| node_research
node_researchpre -->|"writes plot data"| node_plot
node_ulpre -->|"prepares"| node_ulcalc
node_ulcalc -->|"invokes"| node_lal
node_inj -->|"invokes"| node_lal
node_injpost -->|"validates"| node_ulpost
node_depth -->|"invokes"| node_lal
node_drill -->|"uses"| node_bits
node_setupsearch -->|"uses"| node_bits
node_searchpost -->|"uses"| node_bits
node_researchpre -->|"uses"| node_bits

click node_drill "https://github.com/bjowen/drill_public/blob/main/code/Drill.sh"
click node_targets "https://github.com/bjowen/drill_public/blob/main/code/ParseTargets.py"
click node_scanpre "https://github.com/bjowen/drill_public/blob/main/code/ScanRunPre.py"
click node_scan "https://github.com/bjowen/drill_public/blob/main/code/ScanRun.py"
click node_setupsearch "https://github.com/bjowen/drill_public/blob/main/code/SetupSearch.py"
click node_searchrun "https://github.com/bjowen/drill_public/blob/main/code/Search.py"
click node_searchpost "https://github.com/bjowen/drill_public/blob/main/code/SearchPost.py"
click node_researchpre "https://github.com/bjowen/drill_public/blob/main/code/ResearchPre.py"
click node_research "https://github.com/bjowen/drill_public/blob/main/code/Research.py"
click node_plot "https://github.com/bjowen/drill_public/blob/main/code/PlotUpperLimits.py"
click node_ulpre "https://github.com/bjowen/drill_public/blob/main/code/UpperLimitPre.py"
click node_ulcalc "https://github.com/bjowen/drill_public/blob/main/code/UpperLimit.py"
click node_inj "https://github.com/bjowen/drill_public/blob/main/code/UpperLimitInjections.py"
click node_injpost "https://github.com/bjowen/drill_public/blob/main/code/UpperLimitInjectionsPost.py"
click node_ulpost "https://github.com/bjowen/drill_public/blob/main/code/UpperLimitPost.py"
click node_depth "https://github.com/bjowen/drill_public/blob/main/code/SensitivityDepth.py"
click node_bits "https://github.com/bjowen/drill_public/blob/main/code/DrillBits.py"
click node_config "https://github.com/bjowen/drill_public/blob/main/search/config.xml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_drill,node_targets,node_scanpre,node_scan toneBlue
class node_setupsearch,node_searchrun,node_sfts toneAmber
class node_searchpost,node_researchpre,node_research,node_plot toneMint
class node_ulpre,node_ulcalc,node_inj,node_injpost,node_ulpost,node_depth,node_slurm toneRose
class node_bits,node_user,node_lal toneIndigo
class node_config toneTeal
```

## Components

### Preparation

- [Pipeline entry](https://github.com/bjowen/drill_public/blob/main/code/Drill.sh): `code/Drill.sh`
- [Target parsing](https://github.com/bjowen/drill_public/blob/main/code/ParseTargets.py): `code/ParseTargets.py`
- [SFT preparation](https://github.com/bjowen/drill_public/blob/main/code/ScanRunPre.py): `code/ScanRunPre.py`
- [SFT scanning](https://github.com/bjowen/drill_public/blob/main/code/ScanRun.py): `code/ScanRun.py`

### Search

- [Search planning](https://github.com/bjowen/drill_public/blob/main/code/SetupSearch.py): `code/SetupSearch.py`
- [Band search](https://github.com/bjowen/drill_public/blob/main/code/Search.py): `code/Search.py`

### Review and follow-up

- [Search collation](https://github.com/bjowen/drill_public/blob/main/code/SearchPost.py): `code/SearchPost.py`
- [Candidate selection](https://github.com/bjowen/drill_public/blob/main/code/ResearchPre.py): `code/ResearchPre.py`
- [Candidate follow-up](https://github.com/bjowen/drill_public/blob/main/code/Research.py): `code/Research.py`
- [Result plots](https://github.com/bjowen/drill_public/blob/main/code/PlotUpperLimits.py): `code/PlotUpperLimits.py`

### Upper limits

- [Limit preparation](https://github.com/bjowen/drill_public/blob/main/code/UpperLimitPre.py): `code/UpperLimitPre.py`
- [Limit estimation](https://github.com/bjowen/drill_public/blob/main/code/UpperLimit.py): `code/UpperLimit.py`
- [Signal injections](https://github.com/bjowen/drill_public/blob/main/code/UpperLimitInjections.py): `code/UpperLimitInjections.py`
- [Injection validation](https://github.com/bjowen/drill_public/blob/main/code/UpperLimitInjectionsPost.py): `code/UpperLimitInjectionsPost.py`
- [Limit collation](https://github.com/bjowen/drill_public/blob/main/code/UpperLimitPost.py): `code/UpperLimitPost.py`
- [Sensitivity depth](https://github.com/bjowen/drill_public/blob/main/code/SensitivityDepth.py): `code/SensitivityDepth.py`

### Shared runtime

- [Pipeline utilities](https://github.com/bjowen/drill_public/blob/main/code/DrillBits.py): `code/DrillBits.py`

### Other components

- **Researcher**
- [Search configuration](https://github.com/bjowen/drill_public/blob/main/search/config.xml): `search/config.xml`
- **SFT data**
- **LALSuite tools**
- **Slurm scheduler**

## Connections

- Researcher → Pipeline entry: runs
- Pipeline entry → Target parsing: dispatches
- Pipeline entry → SFT preparation: dispatches
- Pipeline entry → Search planning: dispatches
- Target parsing → Search configuration: reads
- SFT preparation → Search configuration: reads
- SFT preparation → SFT data: links
- SFT preparation → Slurm scheduler: submits
- SFT preparation → SFT scanning: submits
- Search planning → Search configuration: reads
- Search planning → SFT data: reads
- Search planning → LALSuite tools: invokes
- Search planning → Slurm scheduler: submits
- Search planning → Band search: schedules
- Band search → Search configuration: reads
- Band search → LALSuite tools: invokes
- Search collation → Candidate selection: produces results for
- Candidate selection → Candidate follow-up: prepares reruns
- Candidate selection → Result plots: writes plot data
- Limit preparation → Limit estimation: prepares
- Limit estimation → LALSuite tools: invokes
- Signal injections → LALSuite tools: invokes
- Injection validation → Limit collation: validates
- Sensitivity depth → LALSuite tools: invokes
- Pipeline entry → Pipeline utilities: uses
- Search planning → Pipeline utilities: uses
- Search collation → Pipeline utilities: uses
- Candidate selection → Pipeline utilities: uses
