[arts-users] Changing base parameter for abs_lines

2022-02-18 Thread eric.sauvageat
Dear Richard,


Thank you for your quick and very detailed explanations.


Following your suggestion, I had another look at the Perrin spectroscopic files 
(NewFormat) and for O3-666, the localquanta="J" parameter in the 
AbsorptionLines xml-tag is already defined as such.


So I am not sure if I should just append the fake quantum number to the lines 
of interest, which produced the following error when I tried to read the 
modified file version with the ReadXML method:

"Error parsing rational number"

or if maybe they should be defined in a specific column within the file ?

Thanks also for your advise regarding the Jacobian methods. I'll have a look at 
these as soon as the quantum identifier or "catalog identity" works (no ways to 
use these method without right ?) but this is probably what I am looking for my 
sensitivity analysis.

Thanks for you help,
Eric

De : arts_users.mi  de la part de 
arts_users.mi-requ...@lists.uni-hamburg.de 

Envoyé : jeudi 17 février 2022 12:00
À : arts_users.mi@lists.uni-hamburg.de
Objet : arts_users.mi Digest, Vol 67, Issue 10

Send arts_users.mi mailing list submissions to
arts_users.mi@lists.uni-hamburg.de

To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi
or, via email, send a message with subject or body 'help' to
arts_users.mi-requ...@lists.uni-hamburg.de

You can reach the person managing the list at
arts_users.mi-ow...@lists.uni-hamburg.de

When replying, please edit your Subject line so it is more specific
than "Re: Contents of arts_users.mi digest..."


Today's Topics:

   1. Re: Changing base parameter for abs_lines (Richard Larsson)


--

Message: 1
Date: Wed, 16 Feb 2022 15:43:40 +0100
From: Richard Larsson 
To: eric.sauvag...@unibe.ch
Cc: arts users mi 
Subject: Re: [arts-users] Changing base parameter for abs_lines
Message-ID:

Content-Type: text/plain; charset="utf-8"

Dear Eric,

The QI is not available for the data you are looking at.

It stands for QuantumIdentifier, which is the class in Arts that deals with
quantum numbers and gas species for the purpose of identifying a unique
absorption line.  In 2.4, you define this as something like "O3-666 TR UP J
1 LO J 2", for the gas species O3-666 with upper quantum number J=1 and
lower quantum number J=2.  I am not sure in 2.4 if you can simply define a
QuantumIdentifier in pyarts or if you are required to load it from a file.
You can see example files in the spectroscopy/zeeman/*.qid.xml files for
how an energy level is defined with this format (the EN tag makes the UP
and LO tags for different levels unnecessary).

Since the Perrin data does not provide this id-data, the lines are not
unique by Arts standards (or any standard really).  Thus, you cannot use
these methods to change any line parameters directly.  I'm afraid you have
to use more manual methods.  I will make a suggestion below.

You could define 'fake' quantum numbers for the lines that you are
interested in.  If you set localquanta="J" in the AbsorptionLines xml-tag,
and then append "0 0" for the first absorption line, "1 1" for the second,
and so on for all the absorption lines.  Now the lines that you are
interested in can be found using  "O3-666 TR UP J i LO J i", where i would
be the absorption line index.  This way you could perform the calculations
that you are after and use the built-in methods to change the base
parameters for the lines you identify as important.

Note though that if you go with this solutions and your interest is just to
compute the sensitivities, there are two Jacobian methods available for
that purpose - jacobianAddShapeCatalogParameter
and jacobianAddBasicCatalogParameter - that already analytically computes
what the partial derivative wrt the added catalog parameters will be.
Using them is the same as using any other type of Jacobian in Arts, so you
should be able to compute the sensitivities in a somewhat straight-forward
manner.  (The catalog_identity for these are the QI of the other
methods.).  You can add as many unique parameters (for multiple absorption
lines) you want and the output should just be OK.

With hope,
//Richard

Den tors 10 feb. 2022 kl 07:40 skrev :

> Dear ARTS community,
>
>
> In order to perform some sensitivity analysis on ozone retrievals, I would
> like to artificially modify some absorption lines parameters (e.g. line
> strength and frequencies) on the ozone line.
>
>
> From my understanding, this would be the goal of either ones the following
> workspace methods:
>
>
> abs_linesChangeBaseParameterForMatchingLines()
>
>
> abs_lines_per_speciesChangeBaseParameterForSpecies()
>
>
> which both require among a QI (

Re: [arts-users] Changing base parameter for abs_lines

2022-02-16 Thread Richard Larsson
Dear Eric,

The QI is not available for the data you are looking at.

It stands for QuantumIdentifier, which is the class in Arts that deals with
quantum numbers and gas species for the purpose of identifying a unique
absorption line.  In 2.4, you define this as something like "O3-666 TR UP J
1 LO J 2", for the gas species O3-666 with upper quantum number J=1 and
lower quantum number J=2.  I am not sure in 2.4 if you can simply define a
QuantumIdentifier in pyarts or if you are required to load it from a file.
You can see example files in the spectroscopy/zeeman/*.qid.xml files for
how an energy level is defined with this format (the EN tag makes the UP
and LO tags for different levels unnecessary).

Since the Perrin data does not provide this id-data, the lines are not
unique by Arts standards (or any standard really).  Thus, you cannot use
these methods to change any line parameters directly.  I'm afraid you have
to use more manual methods.  I will make a suggestion below.

You could define 'fake' quantum numbers for the lines that you are
interested in.  If you set localquanta="J" in the AbsorptionLines xml-tag,
and then append "0 0" for the first absorption line, "1 1" for the second,
and so on for all the absorption lines.  Now the lines that you are
interested in can be found using  "O3-666 TR UP J i LO J i", where i would
be the absorption line index.  This way you could perform the calculations
that you are after and use the built-in methods to change the base
parameters for the lines you identify as important.

Note though that if you go with this solutions and your interest is just to
compute the sensitivities, there are two Jacobian methods available for
that purpose - jacobianAddShapeCatalogParameter
and jacobianAddBasicCatalogParameter - that already analytically computes
what the partial derivative wrt the added catalog parameters will be.
Using them is the same as using any other type of Jacobian in Arts, so you
should be able to compute the sensitivities in a somewhat straight-forward
manner.  (The catalog_identity for these are the QI of the other
methods.).  You can add as many unique parameters (for multiple absorption
lines) you want and the output should just be OK.

With hope,
//Richard

Den tors 10 feb. 2022 kl 07:40 skrev :

> Dear ARTS community,
>
>
> In order to perform some sensitivity analysis on ozone retrievals, I would
> like to artificially modify some absorption lines parameters (e.g. line
> strength and frequencies) on the ozone line.
>
>
> From my understanding, this would be the goal of either ones the following
> workspace methods:
>
>
> abs_linesChangeBaseParameterForMatchingLines()
>
>
> abs_lines_per_speciesChangeBaseParameterForSpecies()
>
>
> which both require among a QI ("quantum identifier to match the line")
> parameter.
>
>
> If this is the case, I am not sure about what exactly is this QI and where
> I can find it (or set it) for a specific absorption line ?
>
>
> I am using ARTS 2.4 (through pyarts) and am defining the spectroscopy by
> reading the Perrin_newformat_speciessplit/o3-666.xml.gz located in the
> original ARTS-xml-data folder (2.4) and then uning the
> abs_lines_per_speciesCreateFromLines() method.
>
>
> Thanks for your help.
>
>
> Best,
>
> Eric
>
>
>
>
> ___
> arts_users.mi mailing list
> arts_users.mi@lists.uni-hamburg.de
> https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi
>
___
arts_users.mi mailing list
arts_users.mi@lists.uni-hamburg.de
https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi


[arts-users] Changing base parameter for abs_lines

2022-02-09 Thread eric.sauvageat
Dear ARTS community,


In order to perform some sensitivity analysis on ozone retrievals, I would like 
to artificially modify some absorption lines parameters (e.g. line strength and 
frequencies) on the ozone line.


>From my understanding, this would be the goal of either ones the following 
>workspace methods:


abs_linesChangeBaseParameterForMatchingLines()


abs_lines_per_speciesChangeBaseParameterForSpecies()


which both require among a QI ("quantum identifier to match the line") 
parameter.


If this is the case, I am not sure about what exactly is this QI and where I 
can find it (or set it) for a specific absorption line ?


I am using ARTS 2.4 (through pyarts) and am defining the spectroscopy by 
reading the Perrin_newformat_speciessplit/o3-666.xml.gz located in the original 
ARTS-xml-data folder (2.4) and then uning the 
abs_lines_per_speciesCreateFromLines() method.


Thanks for your help.


Best,

Eric



___
arts_users.mi mailing list
arts_users.mi@lists.uni-hamburg.de
https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi