From 4f00452b6bdc25a7511305e3a049d31be40ebea9 Mon Sep 17 00:00:00 2001 From: Dylan McReynolds Date: Tue, 28 Jun 2022 11:28:17 -0700 Subject: [PATCH 1/2] add docs --- README.md | 6 ++++-- docs/concepts.md | 7 +++++++ docs/tasks.md | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 docs/concepts.md create mode 100644 docs/tasks.md diff --git a/README.md b/README.md index 280a9a3..c85df4d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # 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. To do this create the following directories: @@ -15,7 +15,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: @@ -25,6 +25,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. diff --git a/docs/concepts.md b/docs/concepts.md new file mode 100644 index 0000000..2acf390 --- /dev/null +++ b/docs/concepts.md @@ -0,0 +1,7 @@ +# Concepts + +## Autotag + +## SplashML + +## \ No newline at end of file diff --git a/docs/tasks.md b/docs/tasks.md new file mode 100644 index 0000000..d5e3587 --- /dev/null +++ b/docs/tasks.md @@ -0,0 +1,3 @@ +# How To Guide + +The peak detection application \ No newline at end of file From 06fbf620c4e63606737636e7f4709c72fab7f85c Mon Sep 17 00:00:00 2001 From: Dylan McReynolds Date: Tue, 28 Jun 2022 15:27:24 -0700 Subject: [PATCH 2/2] Add concept and tasks docs --- README.md | 2 ++ docs/concepts.md | 12 ++++++++++-- docs/tasks.md | 35 ++++++++++++++++++++++++++++++++++- 3 files changed, 46 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c85df4d..388d57d 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ ## Description 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: * Clone this directory into any location diff --git a/docs/concepts.md b/docs/concepts.md index 2acf390..4b1a9c5 100644 --- a/docs/concepts.md +++ b/docs/concepts.md @@ -1,7 +1,15 @@ # Concepts -## Autotag +## 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. -## \ No newline at end of file +## 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. \ No newline at end of file diff --git a/docs/tasks.md b/docs/tasks.md index d5e3587..c299571 100644 --- a/docs/tasks.md +++ b/docs/tasks.md @@ -1,3 +1,36 @@ # How To Guide -The peak detection application \ No newline at end of file +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. \ No newline at end of file