MPB-DATA(1)
๐ MPB-DATA(1) ๐
okay so you found the mpb-data page in the MIT Photonic-Bands Package, and bestie, I'm gonna walk you through it like we're texting at 1am. no cap, every single flag is here. let's go ๐ซถ
โจ NAME โจ
mpb-data โ transformations of HDF5 files output by MPB ๐
๐ SYNOPSIS ๐
mpb-data [OPTION]... [HDF5FILE]...
๐ฆ DESCRIPTION ๐ฆ
mpb-data is a lil utility that does extra processing and transformations on HDF5 files that MPB output. MPB = the MIT Photonic-Bands program, and you know it. Specifically, this tool is designed to make the output way more amenable to visualization by reformatting it into a rectangular grid, extending it to multiple periods, and rescaling the data. it's giving glow-up for your data ๐
MIT Photonic Bands (MPB) is a free program to compute the band structures (dispersion relations) and electromagnetic modes of periodic dielectric structures. iconic, honestly.
HDF5 is a free, portable binary format and supporting library developed by the National Center for Supercomputing Applications at the University of Illinois in Urbana-Champaign. a single h5 file can contain multiple data sets; by default, mpb-data operates on all of the MPB-produced datasets in the file, but you can change that with the -d option, or by using the syntax HDF5FILE:DATASET. so many options, main character energy fr fr.
mpb-data writes its output datasets as additional datasets in the input file(s), with "-new" appended to the dataset names. Alternatively, it can write its output to a separate file, specified by the -o option. choose your adventure ๐ซ
โ ๏ธ note also that, by default, the output datasets are identical to the input datasets; you must use one or more of the options below to specify a transformation (e.g. the-r/-eand-noptions are very useful). don't be out here thinking it did something when it did nothing, okay? ๐ญ
๐ OPTIONS ๐
-hโ Display help on the command-line options and usage. your bestie when you're lost ๐งญ-Vโ Print the version number and copyright info formpb-data. โจ-vโ Verbose output. she tells you everything ๐ฌ-ofile โ Write output datasets to file (for the first input file only) rather than as additional datasets in the input file(s) (the default). heads up: first file only, periodt.-rโ Output a rectangular cell with the same volume as the cell of the input data. This option is particularly useful for visualizing data from non-orthogonal unit cells (e.g. a triangular lattice), as otherwise the data will appear skewed or warped in most graphics programs. This option should almost always be accompanied by the-noption to ensure a uniform resolution. lowkey essential.-ex,y,z โ As the-roption, but also make the first axis of the output along the x,y,z direction (in Cartesian coordinates) instead of along the first lattice vector as for-r. the upgrade edition ๐-Pphaseangle โ For complex-valued datasets, this option causes the output values to be rotated by phaseangle degrees in the complex plane. That is, they are multiplied byexp(2 pi i phaseangle / 360). rotate, slay, repeat ๐-nn โ Output n grid points per lattice unit ("a"). This is useful not only for interpolating to finer (or coarser) resolutions, but also to ensure that the resolution is uniform in each direction (to prevent the data from looking distorted when you visualize it). she's versatile ๐-xmx,-ymy,-zmz โ This tellsmpb-datato output multiple periods in the corresponding lattice directions. to use a particular slice of a two- or three-dimensional dataset. e.g.-x 3.2causes the output of 3.2 periods in the first lattice direction. The default is to output only a single period.-ms โ Output s periods in each lattice direction; equivalent to:-x s -y s -z s. all three at once, efficient queen ๐ธ-Tโ The output has the first two dimensions (x and y) transposed. This is useful in conjunction with the parallel (MPI) version of MPB, which for performance reasons outputs all arrays with the first two dimensions transposed.-Tcan undo this transposition. un-transpose her ๐-pโ Pixellized output. Normally, the input data is linearly interpolated to the output grid, but the-poption causes it to instead use the nearest grid point in the input data. This is useful, for example, if you want to study the discretization of the dielectric-function representation. pixel vibes ๐ฎ-dname โ Use dataset name from the input files; otherwise, the first dataset from each file is used. Alternatively, use the syntaxHDF5FILE:DATASET, which allows you to specify a different dataset for each file. You can use theh5lscommand (included with hdf5) to find the names of datasets within a file.
Note that this option is generally unnecessary, since mpb-data can already find the relevant dataset(s) for files created by MPB. Also, note that mpb-data treats the dataset specified by this option as a real scalar dataset and does not include the exp(ikx) factors when extending the dataset to multiple periods. ๐จ important, don't skip this one.
๐ BUGS ๐
Send bug reports to S. G. Johnson, stevenj@alum.mit.edu. she wants to hear from you, fr.
๐ AUTHORS ๐
Written by Steven G. Johnson. Copyright (c) 1999-2012 by the Massachusetts Institute of Technology. ๐
๐ SEE ALSO ๐
okay that's the whole page bestie, you're officially fluent ๐ this was the MPB-DATA(1) page from the MIT Photonic-Bands Package, dated January 27, 2000, source tag MPB. go forth and transform your HDF5 files, iykyk ๐ฆโจ๐
๐ฆ where this page comes from
- debian bookworm: mpb 1.11.1-5 ยท GPL-2.0-or-later
- debian trixie: mpb 1.11.1-6+b2 ยท GPL-2.0-or-later
- ubuntu jammy: mpb 1.11.1-4 ยท GPL-2.0-or-later
- ubuntu noble: mpb 1.11.1-5ubuntu1 ยท GPL-2.0-or-later
- ubuntu questing: mpb 1.11.1-6build5
- ubuntu resolute: mpb 1.12.0-1 ยท GPL-2.0-or-later
- ubuntu stonking: mpb 1.12.0-1build1 ยท GPL-2.0-or-later
- Copyright (C) 1999-2014 Massachusetts Institute of Technology
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms