Skip to content

Commit

Permalink
Merge pull request #2 from chhoumann/pipeline
Browse files Browse the repository at this point in the history
Add pipeline diagram
  • Loading branch information
Ivikhostrup authored Oct 3, 2023
2 parents c378c79 + fb5fc9a commit 7f0d007
Show file tree
Hide file tree
Showing 6 changed files with 707 additions and 0 deletions.
1 change: 1 addition & 0 deletions report_pre_thesis/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
node_modules
19 changes: 19 additions & 0 deletions report_pre_thesis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# P9 Project: Report Pre-Thesis

This is a technical report acting as the 'pre-thesis' for our thesis. It represents our work during the 9th semester, which will be followed by the actual thesis in the 10th semester.

## Pipeline diagram

To get a better understanding of the current pipeline used for ChemCam calibrations, we have created a diagram of the pipeline.

Any edits to the pipeline should be reflected in `pipeline.mmd` using [mermaid.js](http://mermaid.js.org) syntax.

To 'build' the pipeline, run the following command in the terminal:

```bash
# pnpm install # - if you haven't already. Need the mermaid-cli package.
pnpm run pipeline
```

This will generate a file called `pipeline.png` in the `src/images` folder. The pipeline is shown below:
![ChemCam calibration pipeline](src/images/pipeline.png)
9 changes: 9 additions & 0 deletions report_pre_thesis/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "report_pre_thesis",
"scripts": {
"pipeline": "mmdc -i pipeline.mmd -o src/images/pipeline.png -t neutral -b transparent"
},
"dependencies": {
"@mermaid-js/mermaid-cli": "^10.4.0"
}
}
44 changes: 44 additions & 0 deletions report_pre_thesis/pipeline.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
flowchart TD
subgraph DP["Data Preprocessing"]
BS[Background subtraction] -->
WO["Denoise via undecimated wavelet transformation"] -->
WC["Apply wavelength calibration"] -->
CER["Continuum removal"] -->|"Reduced Data Record (RDR)"| IRF["Apply Instrumental Response Function (IRF)"]
end

db[(LIBS Data)] -->|"Experimental data record (EDR)"| DP

DP -->|"Cleaned, calibrated spectra (CCS)"| C

subgraph C["Calibration"]
Input --> NOSM["`Normalize
(Norm 1 or Norm 3)`"] --> F
F[Full Model] --> |"Initial Estimate"| H[Submodel Selection]

SM["Submodel (Low, Mid, High)"]
BR["`Overlap range of submodels
(Low-Mid; Mid-High)`"]

H -.->|In submodel range| SM
H -.-|Within overlap range| BR

BR --> BO["`Blend
(*Linear weighted sum*)`"]

SM -->|Model output| J
BO -->|Blended output| J

Input --> WE["Weigh by inverse IRF"] --> NOI["`Normalize
(Norm 1 or Norm 3)`"] --> I



I["`ICA with Joint Approximate Diagonalization of Eigenmatrices (JADE)`"]
I -->|Components & Mixing matrix| J


J["`Combine PLS & ICA
(_weigted average_)`"]
end

C --> K["Multivariate Oxide Composition (MOC) Derivation"]
Loading

0 comments on commit 7f0d007

Please sign in to comment.