{ "cells": [ { "cell_type": "markdown", "id": "f8d24115", "metadata": {}, "source": [ "# Defining Simulation Inputs" ] }, { "cell_type": "markdown", "id": "4842fde1", "metadata": {}, "source": [ "In this tutorial, we'll cover how to setup your simulation by defining the basic simulation and physical parameters. " ] }, { "cell_type": "code", "execution_count": 26, "id": "073e7dd3", "metadata": {}, "outputs": [], "source": [ "import py21cmfast as p21c\n", "from tempfile import mkdtemp\n", "from pathlib import Path" ] }, { "cell_type": "code", "execution_count": 3, "id": "e3834fd0", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " Using 21cmFAST version 4.0.0b1.dev312+gb6f5204f.d20250728\n" ] } ], "source": [ "print(f' Using 21cmFAST version {p21c.__version__}')" ] }, { "cell_type": "markdown", "id": "72f690bc", "metadata": {}, "source": [ "## The `InputParameters` Class and Parameter Subgroups" ] }, { "cell_type": "markdown", "id": "0d3000b9", "metadata": {}, "source": [ "All the parameters that `21cmFAST` uses are stored in the `InputParameters` class. This class handles the validation of the set of parameters you specify (in case there are conflicts between parameters), and also gives you a few ways to setup the parameters.\n", "\n", "The easiest way is to use all defaults:" ] }, { "cell_type": "code", "execution_count": 4, "id": "097661b4", "metadata": {}, "outputs": [], "source": [ "inputs = p21c.InputParameters(random_seed=1234)" ] }, { "cell_type": "markdown", "id": "cc225fc7", "metadata": {}, "source": [ "