GYOTO(1)
π« GYOTO β the General relativitY Orbit Tracer of Observatoire de Paris π«
okay bestie, sit down, hydrate, because we're about to talk about literally bending light around black holes and I need you focused π
This is the manual for gyoto, section 1 of the User Manuals. Yes, that's the whole header. It's giving minimalist. We move on.
β¨ NAME β¨
gyoto β the General relativitY Orbit Tracer of Observatoire de Paris. That's the whole name, and honestly? Iconic. The acronym is doing gymnastics and it ate. π©°
π SYNOPSIS π
okay so here's the tea, this is how you actually invoke her:
gyoto [--silent|--quiet|--verbose[=N]|--debug]
[--no-sigfpe]
[--help[=class]] [--version] [--list]
[--ispec=i0:i1:di] [--jspec=j0:j1:dj]
([--imin=i0] [--imax=i1] [--di=di])
([--jmin=j0] [--jmax=j1] [--dj=dj])
[--time=tobs] [--tmin=tmin]
[--fov=angle] [--resolution=npix] [--distance=dist]
[--paln=Omega] [--inclination=i] [--argument=theta]
[--nthreads=nth] [--nprocesses=nworkers]
[--plugins=pluglist]
[--impact-coords[=fname.fits]]
[--unit[=unit]]
[--parameter=Path::Name[=value]]
[--xmlwrite=output.xml]
[--] input.xml output.fits
and then, because one form wasn't enough, she also has a whole other mode:
gyoto mk-video [options]
that's right, she does movies too. multi-talented. main character energy, no cap. π¬
π DESCRIPTION π
okay so Gyoto is a whole framework for computing geodesics in curved space-times. Which, in bestie terms, means it traces the paths that light and particles take when space itself is all warped and weird. π
The gyoto utility program uses that framework to compute images of astronomical objects in the vicinity of compact objects (e.g. black-holes, the celebrities of the cosmos). And here's the wild part β those images get distorted by strong gravitational lensing. So you're not just looking at the thing, you're looking at the thing through the warped fabric of spacetime. it's giving funhouse mirror but make it astrophysics. πͺβ¨
π¦ Form one: make me a picture π¦
In the first form, gyoto takes a scenery description in XML format (input.xml), computes this scenery using relativistic ray-tracing, and saves the result in FITS format.
so: XML in, FITS out. clean. efficient. we love a pipeline. π«Ά
π Form two: make me a movie π
In the second form, gyoto produces a movie. π₯
For the deets, hit up gyoto mk-video --help β she'll tell you everything.
But here's the specific slay: it can read a Scenery in XML format and a trajectory also in XML format (for instance produced with gyotoy(1), see below, we'll get there) and produce a movie as would be seen by an observer following this trajectory.
like... you get to ride along with the observer. cinema. πΏ
β οΈ bestie, heads up: the Gyoto plug-in python and the Python module OpenCV-Python must be installed for this. Not optional. No skipping.
And the Python flavor to use can be controlled through the GYOTO_PYTHON environment variable. π
πΈ your little companion app πΈ
A companion program, gyotoy(1), can be used to interactively visualize a single geodesic in any Gyoto metric β that's the trajectory of a single photon or massive particle.
one particle. one path. up close and personal. she's the intimate portrait to gyoto's wide shot. πΌοΈ
π the part where I warn you about runtime π
Ray-tracing can be very time consuming. Like, go-make-a-snack time consuming. Go-live-your-life time consuming.
BUT. It is possible to interrupt the process at any time by hitting ^C, which will save the already-computed part of the image before exiting the program.
π so you don't lose your progress. she saves your work on the way out. queen behaviour.
You can then compute the rest of the image later using the --jmin option. Resume from where you left off. β¨
more of this manual coming up next, don't go anywhere bestie π
π OPTIONS π
okay bestie, this is the part where gyoto shows off. It takes a lot of options, and here's the tea on how they work π«
Most options have a long name (like --parameter) and a short name (like -E). When an option takes an argument, that argument has to come right after the short option, no space, like -EPath::Name. For a long option you separate it with exactly one = character, like --parameter=Path::Name. Long options can be abbreviated as long as the abbreviation isn't ambiguous β so --par=Path::Name totally works β¨
Most options can show up several times, and they get processed in the order they appear on the command line. The two positional parameters (input.xml and output.fits) can appear anywhere in the command line β unless they start with a minus character (-), in which case they must come last, after the -- option. no cap π
π Getting help
--help[=class],-h[class]β If you don't give it a class, it prints a help summary. It's not as wordy as this manual page, but honestly the output ofgyoto -hmay be more complete and more up to date. If you do specify class, it lists and documents the properties of that class (e.g."Screen","Astrobj::Star"). Then it exits the program β unless--listbelow has only been specified. π--list,-lβ Prints the list of currently registeredAstrobj,Metric, etc., then exits the program. This happens after loadinginput.xml(if you provided one), so any plug-in specified in the input file is already loaded by then. iconic.--version,-Vβ Prints the Gyoto version, the ABI compatibility version, and copyright information, then exits. the receipts β¨
πΈ Setting the verbosity level
These options are processed separately from all the others, and they take effect early in the program execution. like they show up early to the party π
--silent,-sβ No output. π€«--quiet,-qβ Minimal output.--verbose[=N],-v[N]β Verbose mode. You can specify verbosity level N.--debug,-dβ Insanely verbose. π--no-sigfpeβ Do not try to raiseSIGFPEupon arithmetic exceptions. This option is only meaningful iffenv.hsupport is built in. Otherwise it's a no-op, becauseSIGFPEis never raised. (it's giving "I do nothing and I'm proud" π)
π¦ Loading plug-ins
--plugins[=[nofail:]plug1[,[nofail:]plug2][...]],-p[[nofail:]plug1[,[nofail:]plug2][...]]β A comma-separated list of Gyoto plugins to load. This overrides theGYOTO_PLUGINSenvironment variable (see below). Only the last occurrence matters. periodt.
π Selecting a region
You can ray-trace only part of the scenery by handing over the pixel coordinates of the bottom-left corner (i0, j0) and the top-right corner (i1, j1) of the region. Heads up: the bottom-left pixel of the complete image has coordinates i=1 and j=1. You can also specify the step in each direction (di, dj). π―
--ispec=[i0]:[i1]:[di],-i[i0]:[i1]:[di]β the i-direction spec.--jspec=[j0]:[j1]:[dj],-j[j0]:[j1]:[dj]β the j-direction spec.
Default values for both: x0: 1; x1: npix (see option --resolution below); dx: 1.
--ispec=N,-iNβ Set bothx0andx1toN.--jspec=N,-jNβ Set bothx0andx1toN.
π Alternate region-selection options:
These are still supported for backward compatibility, but they're deprecated in favour of --ispec and --jspec above. So likeβ¦ they're the older sibling options, still valid, but the new ones ate π
--imin=i0β Default value:1.--imax=i1β Default value:npix(see option--resolutionbelow).--di=diβ Default value:1.--jmin=j0β Default value:1.--jmax=j1β Default value:npix(see option--resolutionbelow).--dj=djβ Default value:1.
π Setting the camera position
These parameters are normally provided in the Screen section of input.xml, but you can override them on the command line β for instance to make a movie, by calling gyoto for each movie frame and changing only the option --time. main character energy, fr fr π¬
--time=tobsβ The observing time in geometrical units.--fov=angleβ The field-of-view of the camera, in radians.--resolution=npix,-rnpixβ Number of rows and columns in the output image.--distance=distβ (Coordinate) distance from the observer to the center of the coordinate system, in geometrical units.--paln=Omegaβ Position angle of the line of nodes, in radians, East of North. This is the angle between the North direction and the line of nodes (see below).--inclination=iβ Angle between the plane of the sky and the equator of the coordinate system. The intersection of those two planes is the line of nodes.--argument=thetaβ Angle in the equatorial plane between the line of nodes and one of the main axes of the coordinate system.
β Miscellaneous
Unsorted option(s) β yes, this is the junk drawer and honestly? we love her π§
--β Ends option processing, in case eitherinput.xmloroutput.fitsstarts with"-".--nthreads=nth,-Tnthβ Number of parallel threads to use. For instance, on a dual-core machine,--nthreads=2should give you the fastest computation. This option is silently ignored if Gyoto was compiled without POSIX threads support. Note that the metric and the object are replicated for each thread, which can lead to a decrease in performance if either one is memory-intensive. Setting this option to0is equivalent to setting it to1.--nprocesses=nworkers,-Pnworkersβ Number of MPI processes to spawn for parallel ray-tracing, in addition to the maingyotoprocess, which sticks around to manage the computation. Ignored ifgyotowas compiled without MPI support. nworkers is the number of workers spawned. The total number of processes isnprocs=nworkers+1.-P0disables MPI multi-processing, while-P1uses two processes: the manager and one worker. If nworkers is>0,--nthreadsis ignored. Note that the MPI environment usually needs to be set up using some variant ofmpirun(1). Ifmpirunstarts several instances ofgyoto, nworkers must be>0, but its exact value is ignored, since the set of processes used is exactly the one launched bympirun. In other words, Gyoto can be called in a number of ways that should be functionally equivalent:- let
mpirunlaunchnprocsinstances of thegyotoexecutable:
- let
mpirun -np -Pnprocs gyoto -P1 input.xml output.fits
- let
mpirunlaunch 1 instance of thegyotoexecutable, and Gyoto spawn nworkers worker processes:
mpirun -np 1 gyoto -Pworkers input.xml output.fits
- let
mpirunlaunch 1 instance of thegyotoexecutable, and nworkers worker processes:
mpirun -np 1 gyoto -P1 input.xml output.fits : \
-np nworkers gyoto-mpi-worker.version
where version is the ABI compatibility version of gyoto (see gyoto --version).
--impact-coords[=impactcoords.fits]β In some circumstances, you may want to perform several computations in which the computed geodesics end up being exactly identical. This is the case, for instance, if you want to experiment with changing the spectrum of a star, or when making a movie of a rotating, optically thick disk. This option gives you a mechanism to not recompute the geodesics in the most simple case, i.e. when:- the
Screenis always at the same position; - the
Metricis always exactly the same; - the
Astrobjis optically thick (no radiative transfer processing is necessary); - the location and shape of the
Astrobjis always the same.
- the
If --impact-coords is passed without specifying impactcoords.fits, the 8-coordinate vectors of the object and photon at impact point are saved for each point of the Screen. Missing data (no impact) are set to DBL_MAX. These data are saved as a supplementary image HDU in the FITS file, which is identified by its EXTNAME: "Gyoto Impact Coordinates". The FITS keyword "HIERARCH Gyoto Observing Date" of this HDU holds the observing date (in geometrical unit).
If impactcoords.fits is specified, the above mentioned data are read back from this file. The ray-tracing is not performed, but the Gyoto::Astrobj::Generic::processHitQuantities() method is called directly, yielding the same result if the four conditions above are met. The observing date stored in the FITS keyword "HIERARCH Gyoto Observing Date" is compared to the date specified in the screen or using the --time option, and the impact coordinates are shifted in time accordingly.
It is also possible to set the two versions of this option at the same time:
--impact-coords=impactcoords.fits --impact-coords
In this case, the impact coordinates are read from impactcoords.fits, shifted in time, and saved in output.fits.
--unit[=unit],-u[unit]β Specify the unit to use for allowing instances of--parameter, until the next instance of--unit.--parameter=Path::Name[=value],-EPath::Name[=value]β Set an arbitrary parameter by name. Parameters can be set in theAstrobj,Metric, etc. using thePathcomponent. For instance,
For instance, assuming the Astrobj in star.xml has a property named "Radius" that can be set in unit "km", and a property named "Spectrum" which has a property named "Temperature", we can set the radius, the temperature and the quantities to compute (a property in the Scenery itself) with:
gyoto -EQuantities=Spectrum \
-ukm -EAstrobj::Radius=3 \
-u -EAstrobj::Spectrum::Temperature=1000 \
star.xml star.fits
gyoto --parameter=Quantities=Spectrum \
--unit=km --parameter=Astrobj::Radius=3 \
--unit="" --param=Astrobj::Spectrum::Temperature=1000 \
star.xml star.fits
--xmlwrite=output.xml,-Xoutput.xmlβ Write the scenery back to an XML file. The new file will contain additional default parameters and reflect the effect of--(astrobj|metric|scenery|screen|spectrometer)-parameterthat appear before--xmlwrite. Can appear several times, e.g. to generate several XML files with different settings. π
π FILES π
input.xmlβ bestie this is the gyoto input file, and it's in XML format, no cap. Several examples ship in the sourcedoc/examplesdirectory β¨. Depending on how you installed gyoto, they might already be chillin' on your system somewhere like/usr/share/doc/libgyoto/examples/π«Ά. Okay real talk though: documenting the whole XML file format that Gyoto supports is so beyond the scope of this manpage π β go read the library documentation instead. It might come with your package manager, you can compile it from the Gyoto source, or you can peek it online athttp://gyoto.obspm.fr/π.output.fitsβ the output image, in FITS format, iconic π . But listen:gyotowill not overwriteoutput.fitsunless it's prefixed with an (escaped)!, like this:gyoto in.xml \!out.fits. Protect your files, queen π. Also, depending on the Gyoto Quantities and the Spectrometer specified ininput.xml, this file may actually be a whole stack of images, not just one π. Want the tea on the FITS format? Seehttp://fits.gsfc.nasa.gov/.
π± ENVIRONMENT π±
GYOTO_PLUGINSβ Gyoto's astronomical objects and metrics are implemented in plug-ins, periodt. If you wanna use more (or less!!) than the standard plug-ins, set the environment variableGYOTO_PLUGINSto a comma-separated list of plug-ins π«.gyotowill exit with an error status if it can't load a plug-in you specified β unless that plug-in is prefixed withnofail:inGYOTO_PLUGINS, in which case it justβ¦ doesn't fail π. Heads up: this environment variable gets overridden by the--pluginscommand-line parameter, so command line wins, always π .
Default value: "stdplug,nofail:lorene" β
Gyoto tries to find plug-ins by first relying on the system's dynamic linker (so paths in e.g. LD_LIBRARY_PATH and ld.so.conf get searched first π). If that fails, it looks in PREFIX/lib/gyoto/ and finally in PREFIX/lib/gyoto/SOVERS/, where PREFIX and SOVERS are two compile-time options. PREFIX is usually /usr/local or /usr πΈ. At the time of writing, SOVERS is 0.0.0 β yes, really, that's the whole version number, she's minimal π.
GYOTO_PYTHONβ the name of the Python plug-in to use formk-video(typically either"python3"or a more specific version like"python3.12"π). By default, several names are tried, so she'll figure it out herself, main character energy fr fr β¨.
πͺ EXIT STATUS πͺ
gyoto returns 0 upon success π, 1 if it's unable to parse the command line or to interpret input.xml π, and a CFITSIO error code if something goes wrong when trying to open, write to, or close output.fits π. For the full deets, refer to the CFITSIO documentation π.
βοΈ AUTHOR βοΈ
Thibaut Paumard <thibaut.paumard@obspm.fr> wrote this manual π«Ά. Legend behavior, honestly.
π SEE ALSO π
and that's the whole page bestie!! πβ¨ππ¦πΈπ π«Άπ₯ππβπππ§
This gorgeous little manual comes from the Science section, dated January 2024, and it's page GYOTO(1) β go forth and simulate some spacetime, you absolute icon π«πͺ
π¦ where this page comes from
- debian trixie: gyoto-bin 2.0.2-6+b2 Β· GPL-3.0-or-later
- ubuntu noble: gyoto-bin 2.0.2-1.1build3 Β· GPL-3.0-or-later
- ubuntu questing: gyoto-bin 2.0.2-6build4
- ubuntu resolute: gyoto-bin 2.0.2-7build3 Β· GPL-3.0-or-later
- ubuntu stonking: gyoto-bin 2.0.2-8ubuntu1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms