npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nuclear-toi

v1.0.3

Published

An npm package to query data from the Lund/LBNL Nuclear Data Search (http://nucleardata.nuclear.lu.se/toi/) Table of Isotopes

Downloads

16

Readme

Nuclear toi

Table of Radioactive Isotopes (toi) API

Link to the npm package

An npm package to query data from the Lund/LBNL Nuclear Data Search (http://nucleardata.nuclear.lu.se/toi/) Table of Isotopes. It queries data from the database and act as an API for their very simple (and very, very yellow) website. It behaves like an API for you, but what it actually does is making GET requests to their server and parsing the html tables they use.

At the moment this is very simple since it's born to serve a purpose in another program I'm working on for my master thesis, but I'm planning on actively expanding on it since the world deserves a better API to query nuclear data in Node.js.

Features:

  • Get all the possible elements decaying with gamma rays in a given energy
  • Guess what elements may be responsible for a spectra by the energy peaks

Usage examples:

  • Get elements decaying with gamma rays from 300 keV to 301.999.. kEv

    var Toi = require('nuclear-toi');
    
    // Everything returns a promise
    
    /**
     * Get the elements decaying at the specified energy range. return a promise
     * from: energy in keV (integer)
     * to: energy in keV (integer)
     */
    Toi.getGammaAtEnergyRange(300, 301).then(data => {
      for (var x of data) {
          console.log(x);
      }
    });

    Output:

    { Energy: 300, Intensity: 0.015, Element: '224Ac', Decay: 'a' }
    { Energy: 300, Intensity: 0.0225, Element: '223Fr', Decay: 'b-' }
    { Energy: 300, Intensity: 0.15, Element: '236Pa', Decay: 'b-' }
    { Energy: 300, Intensity: 0.23, Element: '151Dy', Decay: 'e+b+' }
    { Energy: 300, Intensity: 0.34, Element: '227Th', Decay: 'a' }
    { Energy: 300, Intensity: 2.32, Element: '227Th', Decay: 'a' }
    { Energy: 300, Intensity: 5.2, Element: '179Pt', Decay: 'e+b+' }
    { Energy: 300, Intensity: 6, Element: '134Sm', Decay: 'e+b+' }
    ....
  • Get elements decaying at least with gamma energy 333±1 keV, 444±1 keV and 555±1 keV.

    var Toi = require('nuclear-toi');
    /**
     * Get all the possible elements with the specified energies, within an error
     * First argument: number[] energyArray in keV
     * Second argument: number error in keV
     */
     Toi.getPossibleElementsWithError([333,444,555], 1).then(data => {
        for (var x of data) {
            console.log(x);
        }
    });

    Output:

    185Au
    119I
    228Pa
    104mRh
    185Au

Get in touch

For any question, new features request or problem please fill an issue or email me at dcat (at) protonmail (dot) com. I'll be glad to hear form you and try to help as I can.

This was made by Trintragula (Daniele) in 2017. Don't use this for anything evil and try to respect the service this is based on.

I'll write a blog post abou this sooner or later at blog.danielescarinci.com