Skip to content

Commit

Permalink
Merge pull request #16 from mlexchange/doc_update
Browse files Browse the repository at this point in the history
Doc update
  • Loading branch information
taxe10 authored Jun 29, 2022
2 parents 851d868 + 06fbf62 commit ac06e8c
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Docker: 1D_XRD app

## Description
This docker container automatically finds the peaks within a group of 1D XRD data files and runs a dash app for more percise peak detection.
This docker compose framework automatically finds the peaks within a group of 1D XRD data files and runs a dash app for more precise peak detection.

The project contains standalone version of the [SplashML](./docs/concepts.md#SplashML) tagging framework in order to get a running demo.

To do this create the following directories:

Expand All @@ -15,7 +17,7 @@ First, let's install docker:

* https://docs.docker.com/engine/install/
* Next go into the 1D XRD dir
* type `docker-compose up` into your terminal
* type `docker-compose up` into your terminal (on more recent [versions](https://docs.docker.com/compose/#compose-v2-and-the-new-docker-compose-command) of the Docker desktop, `compose` is part of the docker CLI, meaning that the command is now `docker compose up`)

Next, open up the dash app or splash-ml API:

Expand All @@ -25,6 +27,8 @@ Next, open up the dash app or splash-ml API:
Notes:
- It is assumed that splash-ml handles the path to the dataset, such that file can be read, e.g. "C:/Users/..." vs "/mnt/c/Users/..."

See the [Tasks](./docs/tasks.md) for instructions on using the application.

# Copyright
MLExchange Copyright (c) 2021, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.

Expand Down
15 changes: 15 additions & 0 deletions docs/concepts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Concepts

## Apply Baseline to Peak Fitting
An option in the user interface to change the lower baseline of the fitting.

## Peak Shape
This option in the application allows the user to determine the algorithm for fitting peaks. Currently supported are `Guassian` and `Voigt`.

## SplashML
[SplashML](https://github.com/als-computing/splash-ml) is database service for storing tag information about datasets. It does not store datasets themselves, rather links to those datasets and their corresponding tags. This project contains a standalone version of SplashML for demonstration purposes.

## Tag Window
This option in the application uses an algorithm that allows the user to preselect the number of peaks to detect.
## Tag w/ Blocks
This option in the application uses an algorithm (citation needed) that auto-detects the number of peaks. This option is available in the application and is also appropriate for the batch processing of files.
36 changes: 36 additions & 0 deletions docs/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# How To Guide

The peak detection appplication is a browser-based framework for automatically detecting peaks in 1-D XRD data set. The user can choose from several different algorithms to guide detection, which differ in the amount of user intervention vs. automation that can be performed.

## Data format
Currently, the 1D XRD demo accepts a 2 column comma-separated (.csv) files, with no header row, for example

```csv
1.502500072169232093e+00,1.333536761775019386e+01
1.507500072883772191e+00,1.558678643552360654e+01
1.512500073598311845e+00,1.727255455621030933e+01
1.517500074312851721e+00,1.817530381724509425e+01
```
## Single File Detection
The 1D XRD application lets you provide a file, label detect peaks, and store the those peaks as features in the [SplashML](./concepts.md#SplashML) database.

Steps:
* Click on the "Select Files" link

* Browse to a file on your file system.

> The application displays a plot of the file, with two panes, the full plot and plot with selectors to zoom into a particular section
* Optional: select [Apply Baseline to Peak Fitting](./concepts.md#Apply_Baseline_to_Peak_Fitting)

* Enter a Tag Name. This name will be used to generate the names of the tags added to [SplashML](./concepts.md#SplashML).

* Option 1: click [Tag Window](./concepts.md#tag_window). This option requires you to also add a value in "Number of Peaks".

* Option 2: click [Tag w/ Blocks](./concepts.md#tag_window). This option requires you to also add a value in "Number of Peaks".

### What happened?
The application displays detected peaks in the graph, and displays in the `Current Tags` table the list of detected peaks. Each tag in the `Current Tags` can be saved into SplashML as a new tag, with the `Peak` location (midpoint and amplitude) and the Full Width Half Max of the peak. A color was assigned to each tag, which matches the color in the graph. One can now save `Table of Tags`, which does what?? or `Save to Splash`, which inserts them into SplashML.

## Batch Detection
A future feature which allows the user to bulk detect peaks on a number of files all at once.

0 comments on commit ac06e8c

Please sign in to comment.