Message Boards Message Boards

Using Mathematica to see the world in a different light - part I

POSTED BY: Marco Thiel
4 Replies

@Marco Thiel, amazing post as usual, and we excitingly adding it to Staff Picks! At some point you said:

I have failed to extract a list of all relevant spectral lines from Wolfram|Alpha

Did you mean the following code?

mercuryLINES = WolframAlpha["spectral lines mercury", {{"Lines:AtomicSpectrumData", 1}, "ComputableData"}];
TableForm[Rest[#[[1, 1]]], TableHeadings -> {None, First[#[[1, 1]]]}] &@mercuryLINES

enter image description here

You do not need to know the syntax of WolframAlpha function, just access it interactively (as explained here: Data Formats in Wolfram|Alpha):

enter image description here

enter image description here

enter image description here

POSTED BY: Vitaliy Kaurov

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the tops of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

POSTED BY: Moderation Team

Dear @Vitaliy Kaurov ,

thank you very much for your kind and encouraging words. I am glad that you liked the post.

I was, in fact, aware that one can use Wolfram|Alpha and then click on the more button in the subpod. My problem is that the data I managed to download appears to be incomplete. If we use Wolfram|Alpha to display the spectrum of say mercury it looks like this:

enter image description here

There are spectral lines all over the visual range from 4000-7500 Angstroms. If I go to the pod content I only get the first lines. I can click on "More" and I get some more lines, but no matter how often I click on "More" I only get 21 lines:

lines=WolframAlpha["Spectral lines mercury", {{"Lines:AtomicSpectrumData", 1}, "ComputableData"}, PodStates -> {"Lines:AtomicSpectrumData__More"}]

So in a table this looks like this:

lines[[1, 1]] // TableForm

enter image description here

The last lines I download are at about 4700 Angstroms. That means that a large part of the visual spectrum is not covered in the list I download. I have tried various modifications of the Wolfram|Alpha request, but nothing downloaded all the visible lines. This is not a problem for elements that only have "few" spectral lines, but is more of a problem for those, like mercury, terbium etc that have lots of them. I am not terribly familiar with Wolfram|Alpha syntax and do not know whether there is a way to extract a list of all lines. I am aware that many of the lines are quite weak. Wolfram Alpha also has information on the intensity of the lines:

linesplus = WolframAlpha["spectrum mercury", {{"Lines:AtomicSpectrumData", 1}, "ComputableData"}, PodStates -> {"Lines:AtomicSpectrumData__Show line \characteristics"}];
linesplus[[1, 1]] // TableForm

enter image description here

The transition probability tells us which lines would be strong, i.e. strong enough to be seen with a cheap spectrometer; it appears that only the ones with transition probabilities of about $10^7$ are really easy to detect. I have also noted that the same requests I used above for mercury do not work equally well for all elements, say terbium.

The objective would be to input a spectrum, like the ones I have measured in the post. They I would like to compare that to a database of known spectra and program something that attempts to guess at what is contained in the sample. I have tried importing data from some spectral databases, like this one or this one or this one , but nothing really worked well enough. It would be nice to be able to detect these components from the spectrum. In a project we are doing here, we try to send the spectral data to mobile phones. If we could use CloudDeploy on these platforms, perhaps even on the Apple Watch, that would be nice.

We have seen many fantastic posts here where devices were hooked up to Mathematica and where data was read. Most of the time Mathematica is "only" used to represent data, stream the data online, read it from other deices etc. I wonder whether: (i) the Wolfram Language's abilities could be used even more to improve the data from poor devices, e.g. perform a sort of deconvolution on the spectra I got or do some tricks to mathematically improve the measurements, and (ii) I am looking for examples of how the Wolfram Language adds substantially to the analysis of the data. Being able to decompose the spectrum into the components would be a nice case study.

As I said, I will try to post at least two further examples and I hope that I'll be able to show how much the Wolfram Language can improve the data from poor sensors and perhaps more...

I'd love to hear your thoughts on this.

Best wishes,

Marco

POSTED BY: Marco Thiel

Awesome post, Marco! I'm looking forward to reading your other two posts to "see the world in a different light".

POSTED BY: Bernat Espigulé
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract