From: Matthieu on
Hi everybody,

I want to get the list of energy levels of an element available on the NIST website for spectroscopic calculations. (URL: http://physics.nist.gov/PhysRefData/ASD/levels_form.html)
If you type "h i" in the spectrum query and hit the "Retrieve Data" button, you obtain the list of energy levels of the atomic hydrogen.

I would like to be able to fill the "form" from my program, so I can choose on the fly which element and different options when I need them without having to do it and store all elements and different ionization stages as files on my computer, or even create a database. The issue is that the form is written in pl/sql (http://physics.nist.gov/cgi-bin/ASD/energy1.pl) and I don't have a clue how to interact with it.

Has anybody already done that and could help me please?

Thanks a lot in advance

Matthieu
From: TideMan on
On Mar 15, 1:46 pm, "Matthieu " <baude...(a)creol.ucf.edu> wrote:
> Hi everybody,
>
> I want to get the list of energy levels of an element available on the NIST website for spectroscopic calculations. (URL:http://physics.nist.gov/PhysRefData/ASD/levels_form.html)
> If you type "h i" in the spectrum query and hit the "Retrieve Data" button, you obtain the list of energy levels of the atomic hydrogen.
>
> I would like to be able to fill the "form" from my program, so I can choose on the fly which element and different options when I need them without having to do it and store all elements and different ionization stages as files on my computer, or even create a database. The issue is that the form is written in pl/sql (http://physics.nist.gov/cgi-bin/ASD/energy1.pl) and I don't have a clue how to interact with it.
>
> Has anybody already done that and could help me please?
>
> Thanks a lot in advance
>
> Matthieu

The .pl file does not list for me.
It sounds like a perl file.
Can you post it (providing it's not too long)?

One way to do this is to make energy1.pl a template with tokens in
place of data. For example, where the element id specified, you make
it Element.
Then, in Matlab you read in the .pl file and edit the bits you want to
change using:
fid=fopen('Energy1Template.pl','rt');
a=fscanf(fid,'%c') ;
fclose(fid);
% Change all the tokens to real values
a=strrep(a,'Element','Cd'); % String replacement
etc
% Output the file
fid=fopen('Energy1.pl','wt');
fprintf(fid,'%c',a);
fclose(fid);
% Execute
system('perl Energy1.pl')

You could also do this in perl itself, but with Matlab you may have
more flexibility, especially if you don't know perl.
From: Matthieu on
The only thing I have if the source of the webpage (http://physics.nist.gov/cgi-bin/ASD/energy1.pl) that you can get (it's pretty long and more than half of it is useless)