single page | use frames     summary     class     fields     routine details     file attributes

src/

amespahdbidlsuite__define.pro


Main interface to work with the NASA Ames PAH IR Spectroscopic Database's XML file.

Updated versions of the NASA Ames PAH IR Spectroscopic Database and more information can be found at: www.astrochemistry.org/pahdb.

Examples

Obtaining and plotting the experimental spectrum of the PAH species with UID = 100:

IDL> dbi = OBJ_NEW('AmesPAHdbIDLSuite', Filename='experimental.xml') IDL> pahs = db->GetTransitionsByUID(100) IDL> pahs->Plot IDL> OBJ_DESTROY,[pahs, dbi]

Author information

Author

Dr. Christiaan Boersma

Copyright

BSD licensed

History

Changes:

07-03-2024 Add search logic for n_ch and n_ch3 fields added in v4.00. Christiaan Boersma. 05-09-2024 Add Windows support for MD5 hashing. Christiaan Boersma. 10-10-2023 Generalize caching by adding CACHE_DIR and CACHE methods. Christiaan Boersma. 05-15-2023 Remove invalid search key 'atoms' in TOKENIZEWORDS. Christiaan Boersma. 04-11-2023 Initialize array with appropriate size in GETTAGBYUID. Christiaan Boersma. 12-05-2022 Speed up GETTAGBYUID by using HISTOGRAM. Christiaan Boersma. 10-05-2020 Fix typo in ExtendDatabase. Christiaan Boersma. 11-15-2019 Check the state of parsing an XML-file in PARSEFILE, which avoids caching invalid data. Christiaan Boersma. 02-12-2019 Fixed hitting the maximum value that can be held in a LONG in GETTAGBYUID by changing data type to ULONG. Ensuring returned UIDs reflect those found in GETTAGBYUID. Christiaan Boersma. 07-17-2018 Added EXTENDDATABASE 10-10-2017 Fixed GETUIDSCOMPLETECHARGESET to set list to !NULL when last last anion/neutral has been matched. Christiaan Boersma. 10-06-2017 Added GETHASH to allow retrieval of the calculated md5-sum. Christiaan Boersma. 08-11-2016 If md5 cannot be calculated, the basename of the database XML-file is used instead. Christiaan Boersma. 07-06-2016 Using now TEMPORARY to move pahdb and joined to properties of AmesPAHdbIDLSuite in READFILE and SEARCH, respectively. Christiaan Boersma. 07-02-2016 Added file_md5 as a property, now calling method FILE_MD5 only once in method READFILE, which sets file_md5. Affected routines have been updated. File_md5 is added as a tag to the pahdb structure. SEARCH and READFILE now print a message when saving to cache and both routines have been refactored to store the location of the cache file into a variable. READFILE now only prints the database header when restoring from cache. Christiaan Boersma. 06-29-2016 Remove scale-property from species. Removed extra comma from GETVERSION. Christiaan Boersma. 03-15-2016 Provide argument to ROUTINE_FILEPATH in INIT or compatibility with older version of IDL. Christiaan Boersma. 09-09-2015 Added File_WGET procedure and updated INIT to allow for update check (enabled with the UpdateCheck-keyword). Christiaan Boersma. 08-26-2015 Added File_MD5 procedure and updated READFILE and SEARCH procedures. Updated Init to read VERSION-file from current distribution. Christiaan Boersma. 04-21-2015 Moved stop condition to beginning of SEARCH-method. Removed duplicate charge tokens from TOKENIZEWORDS. Christiaan Boersma. 04-07-2015 Ensured UIDs in GetXXXXByUID are arrays, even when when called with scalar. Christiaan Boersma. 02-01-2015 First version of the file. Christiaan Boersma.

Other file information

Uses:

AmesPAHdbIDLSuite_XMLParser, AmesPAHdbIDLSuite_Species, AmesPAHdbIDLSuite_Transitions, AmesPAHdbIDLSuite_Laboratory_Spectrum, AmesPAHdbIDLSuite_Geometry

Class description for AmesPAHdbIDLSuite

Properties

Properties in AmesPAHdbIDLSuite

Cache init

Use the cache (defaults to 1)

Check init

Check the consistency of the XML-file (defaults to 1)

Filename init

Database XML-file

UpdateCheck init

Check for updates to the Suite (defaults to 1)

Routines

Routines from amespahdbidlsuite__define.pro

result = AmesPAHdbIDLSuite::GetHash()

Returns the MD5-hash of the parsed database file.

AmesPAHdbIDLSuite::Cache [, Hash] [, Clear=string]

Manage the PAHdb cache.

result = AmesPAHdbIDLSuite::GetUIDsCompleteChargeSet(UIDs [, Count] [, Two=int])

Returns the UIDs of complementary charge sets.

result = AmesPAHdbIDLSuite::GetSpeciesByUID(UIDs [, Count])

Returns AmesPAHdbIDLSuite_Species-instance containing the data on the species with UIDs.

result = AmesPAHdbIDLSuite::GetTransitionsByUID(UIDs [, Count])

Returns AmesPAHdbIDLSuite_Transitions-instance containing the data on the species with UIDs.

result = AmesPAHdbIDLSuite::GetLaboratoryByUID(UIDs [, Count])

Returns AmesPAHdbIDLSuite_Laboratory_Spectrum-instance containing the data on the species with UIDs.

result = AmesPAHdbIDLSuite::GetGeometryByUID(UIDs [, Count])

Returns AmesPAHdbIDLSuite_Geometry-instance containing the data on the species with UIDs.

result = AmesPAHdbIDLSuite::Pointer()

Returns a pointer to the parsed database.

result = AmesPAHdbIDLSuite::Search(Str [, Count] [, Query=string])

Returns the UIDs that match the given search Str.

result = AmesPAHdbIDLSuite::CheckVersion(Version)

Checks whether the given Version matched the version of the parsed database.

result = AmesPAHdbIDLSuite::GetVersion( [String=string])

Returns versioning information.

AmesPAHdbIDLSuite::ReadFile, File [, Check=int] [, Cache=int]

Reads in a database XML-file

result = AmesPAHdbIDLSuite::Init( [Filename=string] [, Check=int] [, Cache=int] [, UpdateCheck=int])

Create an AmesPAHdbIDLSuite-instance.

Routine details

top source AmesPAHdbIDLSuite::GetHash

HASHING

result = AmesPAHdbIDLSuite::GetHash()

Returns the MD5-hash of the parsed database file.

Return value

string

top source AmesPAHdbIDLSuite::Cache

CACHE

AmesPAHdbIDLSuite::Cache [, Hash] [, Clear=string]

Manage the PAHdb cache.

Parameters

Hash in optional type=string

Hash to clear

Keywords

Clear in optional type=string

Clear all or selected hash(es)

top source AmesPAHdbIDLSuite::GetUIDsCompleteChargeSet

SEARCH

result = AmesPAHdbIDLSuite::GetUIDsCompleteChargeSet(UIDs [, Count] [, Two=int])

Returns the UIDs of complementary charge sets.

Return value

long array (2D)

Parameters

UIDs in required type=long array (1D)

UIDs to consider; -1 for all

Count out optional type=long

Number of charge sets found

Keywords

Two in optional type=int

Consider only two charge states

Other attributes

Bugs:

There are issues when isomers are present.

top source AmesPAHdbIDLSuite::GetSpeciesByUID

RETRIEVAL

result = AmesPAHdbIDLSuite::GetSpeciesByUID(UIDs [, Count])

Returns AmesPAHdbIDLSuite_Species-instance containing the data on the species with UIDs.

Return value

AmesPAHdbIDLSuite_Species-instance

Parameters

UIDs in required type=long array (1D)

UIDs to consider; -1 for all

Count out optional type=long

Number of species found

Other attributes

Bugs:

Not all species have references/comments and UIDs is updated to only those that do

top source AmesPAHdbIDLSuite::GetTransitionsByUID

RETRIEVAL

result = AmesPAHdbIDLSuite::GetTransitionsByUID(UIDs [, Count])

Returns AmesPAHdbIDLSuite_Transitions-instance containing the data on the species with UIDs.

Return value

AmesPAHdbIDLSuite_Transitions-instance

Parameters

UIDs in required type=long array (1D)

UIDs to consider; -1 for all

Count out optional type=long

Number of species found

top source AmesPAHdbIDLSuite::GetLaboratoryByUID

RETRIEVAL

result = AmesPAHdbIDLSuite::GetLaboratoryByUID(UIDs [, Count])

Returns AmesPAHdbIDLSuite_Laboratory_Spectrum-instance containing the data on the species with UIDs.

Return value

AmesPAHdbIDLSuite_Laboratory_Spectrum-instance

Parameters

UIDs in required type=long array (1D)

UIDs to consider; -1 for all

Count out optional type=long

Number of species found

top source AmesPAHdbIDLSuite::GetGeometryByUID

RETRIEVAL

result = AmesPAHdbIDLSuite::GetGeometryByUID(UIDs [, Count])

Returns AmesPAHdbIDLSuite_Geometry-instance containing the data on the species with UIDs.

Return value

AmesPAHdbIDLSuite_Geometry-instance

Parameters

UIDs in required type=long array (1D)

UIDs to consider; -1 for all

Count out optional type=long

Number of species found

top source AmesPAHdbIDLSuite::Pointer

RETRIEVAL

result = AmesPAHdbIDLSuite::Pointer()

Returns a pointer to the parsed database.

Return value

pointer

top source AmesPAHdbIDLSuite::Search

SEARCH

result = AmesPAHdbIDLSuite::Search(Str [, Count] [, Query=string])

Returns the UIDs that match the given search Str.

Return value

long array (1d)

Parameters

Str in required type=string

Search string

Count out optional type=long

Number of results

Keywords

Query in optional type=string

The generated query-string that can be used with the WHERE-function

top source AmesPAHdbIDLSuite::CheckVersion

VERSIONING

result = AmesPAHdbIDLSuite::CheckVersion(Version)

Checks whether the given Version matched the version of the parsed database.

Return value

long

Parameters

Version in required type=string

Version string

top source AmesPAHdbIDLSuite::GetVersion

VERSIONING

result = AmesPAHdbIDLSuite::GetVersion( [String=string])

Returns versioning information.

Return value

structure or string

Keywords

String out optional type=string

Formatted version string

top source AmesPAHdbIDLSuite::ReadFile

PARSING

AmesPAHdbIDLSuite::ReadFile, File [, Check=int] [, Cache=int]

Reads in a database XML-file

Parameters

File in required type=string

Database XML-file

Keywords

Check in optional type=int

Check the consistency of the XML-file (defaults to 1)

Cache in optional type=int

Use the cache (defaults to 1)

top source AmesPAHdbIDLSuite::Init

CLASS

result = AmesPAHdbIDLSuite::Init( [Filename=string] [, Check=int] [, Cache=int] [, UpdateCheck=int])

Create an AmesPAHdbIDLSuite-instance.

Return value

AmesPAHdbIDLSuite-instance

Keywords

Filename in optional type=string

Database XML-file

Check in optional type=int

Check the consistency of the XML-file (defaults to 1)

Cache in optional type=int

Use the cache (defaults to 1)

UpdateCheck in optional type=int

Check for updates to the Suite (defaults to 1)

File attributes

Modification date: Fri Oct 24 12:51:05 2025
Lines: 855
Docformat: rst rst