CTAN Comprehensive TeX Archive Network

Directory graphics/pgf/contrib/pgf-spectra

This is pgf-spectra, version 3.0.1 (27/04/2023).

This package provides the \pgfspectra[<options>] command which draws continuous and emission or absorption spectra for 98 elements and their ions.
It was developed mainly for the writing of my own documentation and exams sheets supporting directly PDF output format.
The drawing is made with the TikZ package and is based in the pst-spectra extension for PSTricks.
It also allows the user to draw a spectrum with their own personal data.
The lines data extends from Extreme UV to Near IR (from 10 to 4000 nanometers).
It is possible to redshift the lines of a spectrum, by directly entering the redshift value or the velocity and the angle to compute the redshift value.
Spectral lines data can be presented in a table or exported to a file.
This package also provides color conversion (correlated color temperature), shadings for use with TikZ and/or PGFPLOTS, color maps for use with PGFPLOTS, 
displaying the spectral lines in a table and exporting the lines data files.

** Requirements: TikZ package.
** Installation: unpack everything in a directory in the TeX search path and refresh the TeX database.
** Usage: just place \usepackage{pgf-spectra} in the preamble.
** Contact the author: Hugo Gomes (hugo.parelho@gmail.com)
** Licence: released under the LaTeX Project Public License v1.3 or later, see http://www.latex-project.org/lppl.txt

*** v3.0.1 (27/04/2023) ***
Fixed a small bug dealing with the 'axis label'/'axis label text' background color, which occurred when setting a visible background with the 'back' key, e.g., 
\pgfspectra[element=H,axis label text={wavenumber in nanometer},back=visible50]

*** v3.0.0 (25/04/2023) ***

In the \pgfspectra command, syntax for the key 'lines' has been updated: it is now possible to specify a continuous range using 'start wavelength to end 
wavelength', for instance, 'lines={380 to 500}' or 'lines={380 to 500,633}' or 'lines={633,555,380 to 500}'.
New keys for \pgfspectra:
- axis label
- axis label text
- axis label position
New command:
- \usepgfspectralibrary (loads pgf-spectra libraries)
New library 'data' to load spectral lines data, display it in a table or export it to a file. This library provides the commands:
- \pgfspectradata (loads data)
- \pgfspectratable (displays data in a table)
- \pgfspectrawrite (writes data to a file)
Some commands from previous versions have been moved to new libraries:
- \pgfspectraplotshade and \pgfspectraplotmap moved to new library 'pgfplots'
- \tempercolor moved to new library 'tempercolor'
- \pgfspectrarainbow moved to new library 'rainbow'

Previous versions

*** v2.2.0 (21/02/2023) ***
LSE data renormalized to lower values within TeX capabilities. This prevents 'Dimension too large' errors and subsequent errors in spectrum drawing when 
using the 'relative intensity' key.
Added maximum intensities in IR, visible an UV ranges for both data sources (NIST and LSE). Now, when using the 'relative intensity' key, the interval of 
wavelengths is detected and the respective maximum intensity is used. For example, if the spectrum is within the visible range, say between 400 and 700 
nanometers, the maximum visible intensity will be used. The same is true for ranges only in IR or UV ranges. But, if the spectrum to be drawn is in more 
than one region - for example, from 300 to 1000 or from 400 to 1000 or from 300 to 700 nanometers - the maximum intensity that will be used is defined 
as the maximum intensity of all data.
Fixed some typos in the manual.

*** v2.1.2 (03/07/2021) ***
Minor fix: wrong char encoding (pgf-spectra.sty, line:1555)

*** v2.1.1 (27/06/2021) ***
Major changes:
Small documentation enhancements.
Code rewrote for the command \pgfspectraplotshade.
New keys for \pgfspectraplotshade:
- shade begin
- logarithmic

*** v2.1.0 (12/05/2021) ***
The continuous visible region is now drawn via TikZ shading improving a little bit the speed of the whole process.
Minor fix: the width of the emission/absortion lines are now correctly drawn
New commands:
- \tempercolor (correlated color temperature, Kelvin to rgb color)
- \pgfspectrashade (for usage with TikZ package)
- \pgfspectraplotshade (for usage with PGFPLOTS package)
- \pgfspectraplotmap (for usage with PGFPLOTS package)
- \pgfspectrarainbow (draws a rainbow)
New keys for \pgfspectra:
- use visible shading
- backVIS
- axis unit
- axis unit precision
Keys for \pgfspectraplotshade:
- shade end
- shade opacity
- shade opacity color
Keys for \pgfspectrarainbow:
- rainbow fade
- rainbow start
- rainbow knock out
- rainbow background
- rainbow transparency

*** v2.0.0 (15/03/2021) ***
Major changes:
- the 'window' of spectra now ranges from 10nm to 4000nm
 and the lines was updated. (In version 1.0 was 380nm to 740nm)
- support for redshifted (blueshifted) lines
- possibility of setting a style for the spectra's
New commands:
- \pgfspectraStyle
- \pgfspectraStyleReset
New keys:
- axis ticks (axis minor ticks)
- backIRUV (only for emission spectrum)
- IRcolor (for emission lines and for the background in absorption spectrum)
- UVcolor (for emission lines and for the background in absorption spectrum)
- red shift
- show redshift value

*** First release: version 1.0 (15/04/2016) ***
- \pgfspectra
- \wlcolor
- element
- width
- height
- back
- charge
- Imin
- lines
- line width
- begin
- end
- axis step
- axis color
- axis font
- axis font color
- label position
- label before text
- label after text
- label font
- label font color
- gamma
- brightness
- line intensity
- relative intensity threshold
- absorption
- axis
- label
- relative intensity

Download the contents of this package in one zip archive (3.4M).

pgf-spectra – Draw continuous or discrete spectra using PGF/TikZ

The purpose of this package is to draw the spectra of elements in a simple way.

It is based on the package pst-spectra, but with some extra options. It relies on PGF/TikZ for drawing the desired spectrum, continuous or discrete.

There are data available for the spectra of 98 elements and their ions (from the NASA database and from NIST). It also allows the user to draw spectra using their own data.

Version3.0.1 2023-04-27
LicensesThe Project Public License 1.3
MaintainerHugo Gomes
Contained inTeX Live as pgf-spectra
MiKTeX as pgf-spectra
TopicsPGF TikZ
Guest Book Sitemap Contact Contact Author