Coder Social home page Coder Social logo

mzarowka / hsitools Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 32.82 MB

Hyperspectral core scanning data processing in R

Home Page: https://mzarowka.github.io/HSItools/

License: Other

R 99.70% TeX 0.30%
geology geosciences paleoclimate spatial paleolimnology

hsitools's People

Contributors

daveedge1 avatar mzarowka avatar

Stargazers

 avatar

Watchers

 avatar  avatar

hsitools's Issues

Stack plots

Stack plots in a row, using patchwork

  • Create a list of plots.
  • Plot RGB and selected maps.
  • Plot profiles.

Shiny to Quarto metadata dashboard

Add a page or section where the user can input human-readable metadata, like the one below. Then, dump it into the rds and Quarto document and render it to HTML/PDF at the end.

  • Site name
  • Country
  • Core name
  • Project name or other identifiers
  • Coordinates if needed
  • Scan date
  • Person scanning
  • Person processing
  • Other info and comments

run_core to file

Automatically write/store output of run_core() to .rds and script?

GIS rois to hsitools

Get rois recorded in GIS software, read into session and overwrite shiny app output, or use in functions.

Data saving

Save profile data to file

  • Pixel depth.
  • Calibrated pixel depth.
  • Translated depth, metric.
  • Proxies.
  • Options: csv, parquet.

Create terra issue for plotting

The last terra version fully compatible with Shiny was 1.7-46, later versions throw an error when displaying plots in shiny.

Remove all rgdal

Hunt down and remove rgdal dependencies - archived on cran as 1.6-7

Temporary bypass to install

remotes::install_version("rgdal", version = "1.6-7", repos = "http://cran.us.r-project.org")

Select files for normalization

What if files come from either a) an older version of the Specim scanner, b) an entirely different manufacturer, or c) strange magic made it a non-typical, chaotic structure? Can we let users choose DARK/WHITE/CAPTURE files at the first step in Shiny?

Add λREMP

Add λREMP index calculation from Ghanbari et al., 2023.

Calibrate depth

From calibrated pixels, use true top and true bottom to assign actual depths.

Coerce ROIs to SpatVect

Using internal HSItools:::rois_to_vect() coerce "analysisRegions" to terra SpatVectors before shiny session ends.

Ideas

  • Spatial imputation in masked regions based on the neighborhoods?
  • possibly with Random Forests, GANs or...?

Plot RGB image

Plot image of the core and or ROIs

  • Read SpatRaster and RGB layers.
  • #26
  • Optional - write to file.

Second dashboard

The second shiny dashboard is where reflectance can be loaded and displayed, and plots and spectral maps are displayed as the user changes the brush.

RABD variations

Provide three modes for RABD calculations:

  • RABD max - if the range is provided, find the wavelength where a minimum of reflectance is found, flexible.
  • RABD mid - if the range is provided, find the wavelength closest to the mid-point.
  • RABD strict - calculate RABD directly at the selected wavelength.

Spectral indices list

Gather and expand the list of spectral indices with references:

  • R850/R900; minerogenic inputs: Saunders, K.M., Roberts, S.J., Perren, B., Butz, C., Sime, L., Davies, S., Van Nieuwenhuyze, W., Grosjean, M., Hodgson, D.A., 2018. Holocene dynamics of the Southern Hemisphere westerly winds and possible links to CO2 outgassing. Nature Geosci 11, 650–655. https://doi.org/10.1038/s41561-018-0186-5
  • R570/R630; minerogenic inputs, microclastics: Rein, B., Sirocko, F., 2002. In-situ reflectance spectroscopy – analysing techniques for high-resolution pigment logging in sediment cores. Int J Earth Sci (Geol Rundsch) 91, 950–954. https://doi.org/10.1007/s00531-002-0264-0
  • R570/R630 and R590/R690, minerogenic inputs, microclastics: Trachsel, M., Grosjean, M., Schnyder, D., Kamenik, C., Rein, B., 2010. Scanning reflectance spectroscopy (380–730 nm): a novel method for quantitative high-resolution climate reconstructions from minerogenic lake sediments. J Paleolimnol 44, 979–994. https://doi.org/10.1007/s10933-010-9468-7

Plot spectral maps

Function to plot SpatRaster with spectral maps

  • Read data with layer selection and one of the suggested palettes.
  • #25
  • Overlay on RGB.
  • Optional - write to file.

"large" engine

Prepare alternative workflow for large SpatRasters from the newer hyperspectral cameras to avoid memory allocation errors.

Vignette: plotting

General vignette on data plotting.

  • HSI maps.
  • RGB plots.
  • Profiles.
  • Compositing.

scrolling limitation

When adding many ROIs, the lower portion of the table becomes cutoof from view

Relative paths in hsi_core

The path stored in .rds is an absolute path, leading to reprocessing issues when the directory structure is changed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.