{
    "componentChunkName": "component---src-templates-markdown-doc-tsx",
    "path": "/2025.1.3/references/file_formats",
    "result": {"data":{"mdx":{"id":"4d38c1d1-7bc4-5e11-a511-604a027b2dcd","frontmatter":{"title":"","images":null},"body":"var _excluded = [\"components\"];\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n/* @jsxRuntime classic */\n/* @jsx mdx */\n\nvar _frontmatter = {};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n    props = _objectWithoutProperties(_ref, _excluded);\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h1\", null, \"File Formats\"), mdx(\"p\", null, \"This page documents the various file formats used by Salvus.\"), mdx(\"h2\", null, \"Output File Formats\"), mdx(\"p\", null, \"Salvus can directly output point, surface, and volumetric data to HDF5 files.\\nOf these, surface and volumetric data are stored with the same layout, while\\ntwo different options exists for the point data.\"), mdx(\"h3\", null, \"Point Receiver Output File Formats\"), mdx(\"p\", null, \"Salvus has some built-in utilities to conveniently work with receiver files.\\nThis works, independent of the chosen receiver file format, as follows:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"# When directly using the Salvus API:\\nj = sn.api.run(input_file=..., ...)\\nevent_data = j.get_as_event()\\n\\n# When using SalvusProject:\\nevent_data = p.waveforms.get(data_name=\\\"...\\\", events=...)[0]\\n\\n# Get a receiver as an ObsPy Stream object.\\nst = ed.get_receiver_data(\\\"receiver_name\\\", receiver_field=\\\"displacement\\\")\\n\")), mdx(\"p\", null, \"If you want to know about the actual file layouts on disk, please read on.\"), mdx(\"h4\", null, \"HDF5 Block Receivers\"), mdx(\"p\", null, \"By selecting \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"hdf5\"), \" as the point output format Salvus will store all receiver\\ndata in a single HDF5 file:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"w.output.point_data.format = \\\"hdf5\\\"\\n\")), mdx(\"p\", null, \"These files should be easy to read in any data processing software package.\\nPlease let us know if you need assistance. We recommend to use this file\\nformat in most cases.\"), mdx(\"p\", null, \"The internal HDF5 data structure is the same in 2-D and 3-D:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-ini\"\n  }, \"# Meta-data for receivers in acoustic media.\\ncoordinates_ACOUSTIC_point\\nnames_ACOUSTIC_point\\nreceiver_ids_ACOUSTIC_point\\n\\n# Meta-data for receivers in elastic media.\\ncoordinates_ELASTIC_point\\nnames_ELASTIC_point\\nreceiver_ids_ELASTIC_point\\n\\n# Point data.\\npoint/\\n    # Time-series meta-data.\\n    reference_time_in_seconds\\n    sampling_rate_in_hertz\\n    start_time_in_seconds\\n\\n    # The actual point data, per field.\\n    displacement\\n    phi\\n    ...\\n\")), mdx(\"p\", null, \"For \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"PHYSICS\"), \" being either \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ELASTIC\"), \" or \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ACOUSTIC\"), \" the following data sets\\nare defined if at least one receiver of the given physics is part of a simulation:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"coordinates_PHYSICS_point\"), \": An array of coordinates, one for each receiver\\nof the given physics.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"names_PHYSICS_point\"), \": An array of receiver names, one for each receiver of\\nthe given physics.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"receiver_ids_PHYSICS_point\"), \": Indices to map the receivers back to the\\norder in the original input file. For reasons of efficiency Salvus does not\\nretain the order of the receivers when running simulations in parallel.\")), mdx(\"p\", null, \"The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"point/\"), \" group contains the actual time series together with some\\nmeta-information:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"reference_time_in_seconds\"), \": What time zero refers to. Useful to absolutely\\nlocate samples in time. Will be zero if you did not explicitly set this.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"sampling_rate_in_hertz\"), \": The sampling rate in Hertz.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"start_time_in_seconds\"), \": The time of the first sample relative to time zero.\\nMight be negative.\")), mdx(\"p\", null, \"The actual receiver data, depending on the output field, will be stored in\\nhypercubes, one per output field, e.g.: \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"displacement\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"phi\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"stress\"), \", ...\"), mdx(\"p\", null, \"The dimension of each hypercube will be\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"(#receivers_with_that_physics, #components, #samples)\"), \".\"), mdx(\"h4\", null, \"ASDF\"), mdx(\"p\", null, \"The \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://seismic-data.org\"\n  }, \"Adaptable Seismic Data Format (ASDF)\"), \" is a\\nmodern HDF5-based data format capable of efficiently handling large amounts\\nof heterogeneous time series data (e.g. varying length, sampling rates, ...\\nfor each trace) including comprehensive meta data, especially suitable for\\nuse in earthquake seismology. Salvus can directly output to it by selecting\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"asdf\"), \" as the point data output format.\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"w.output.point_data.format = \\\"asdf\\\"\\n\")), mdx(\"p\", null, \"Please refer to the ASDF\\ndocumentation for details on the internal data structure and for libraries\\nable to work with it.\"), mdx(\"p\", null, \"Compared to the HDF5 block receiver output it is a bit slower to work with it\\nbut it is worth it for many applications. We recommend to use this when\\nworking with recorded seismological data.\"), mdx(\"h3\", null, \"Surface/Volume Output File Formats\"), mdx(\"p\", null, \"Salvus currently only supports \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"hdf5\"), \" as the output format for surface and\\nvolume data.\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-python\"\n  }, \"w.output.surface_data.format = \\\"hdf5\\\"\\nw.output.volume_data.format = \\\"hdf5\\\"\\n\")), mdx(\"p\", null, \"These files are always accompanied by one or more \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \".xdmf\"), \" files that can used\\nto visualize the HDF5 files directly in ParaView as described in the\\n\", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"./visualization\"\n  }, \"visualization\"), \" section.\"), mdx(\"p\", null, \"Salvus, independent of the number of cores used to run it in parallel, will\\nalways only output to a single surface or volume data output file.\"), mdx(\"p\", null, \"Data is stored per output field and per element:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-ini\"\n  }, \"# Meta-data for output of acoustic media.\\nconnectivity_ACOUSTIC(_surface)\\ncoordinates_ACOUSTIC(_surface)\\n\\n# Meta-data for output of elastic media.\\nconnectivity_ELASTIC(_surface)\\ncoordinates_ELASTIC(_surface)\\n\\n# Surface/Volume data.\\nvolume/ or surface/\\n    # Surface/Volume data meta-data.\\n    reference_time_in_seconds\\n    sampling_rate_in_hertz\\n    start_time_in_seconds\\n\\n    # The actual surface/volume data, per field.\\n    displacement\\n    phi\\n\")), mdx(\"p\", null, \"For \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"PHYSICS\"), \" being either \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ELASTIC\"), \" or \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"ACOUSTIC\"), \" the following data sets\\nare defined if at least one output field of the corresponding physics was\\nchosen:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"connectivity_PHYSICS(_surface)\"), \": The element connectivity for output of that\\nphysics.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"coordinates_PHYSICS(_surface)\"), \": The actual coordinates for all control notes\\nof that physics.\")), mdx(\"p\", null, \"The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"volume/\"), \" or \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"surface/\"), \" group contains the actual volume/surface data\\ntogether with some meta-information:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"reference_time_in_seconds\"), \": What time zero refers to. Useful to absolutely\\nlocate samples in time. Will be zero if you did not explicitly set this.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"sampling_rate_in_hertz\"), \": The sampling rate in Hertz.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, mdx(\"inlineCode\", {\n    parentName: \"li\"\n  }, \"start_time_in_seconds\"), \": The time of the first sample relative to time zero.\\nMight be negative.\")), mdx(\"p\", null, \"The actual surface/volume data, depending on the output field, will be stored\\nin hypercubes, one per output field, e.g.: \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"displacement\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"phi\"), \", \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"stress\"), \",\\n...\"), mdx(\"p\", null, \"The dimension of each hypercube will be\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"(#time_step, #element_index, #component, #indices_in_element)\"), \".\"), mdx(\"p\", null, \"The last dimension might be padded with zeros.\"));\n}\n;\nMDXContent.isMDXComponent = true;"},"site":{"siteMetadata":{"salvusDocVersions":{"current":"2026.5.0"}}}},"pageContext":{"id":"4d38c1d1-7bc4-5e11-a511-604a027b2dcd"}},
    "staticQueryHashes": ["1756726491","1865182279","3419370438","3597190305","4112489441","519097329"]}