# Running AM³ with Docker Instead of installing it in your local environment, you can install and run AM³ with Docker, which provides platform-independent access. ## Prerequisites Before beginning, ensure you have the following installed: - **Docker**: [Get Docker](https://www.docker.com/get-started) - **Python 3.x**: Check if Python 3.x is installed. - **Python Libraries**: Install `matplotlib`, `numpy`, `astropy`, `seaborn` via pip. For the GUI, make sure to have also installed - **PyGObject**: [PyGObject Guide](https://pygobject.readthedocs.io/en/latest/getting_started.html) - **LaTeX**: Ensure basic LaTeX packages are installed. ## Setup and Execution ### Docker on Linux 1. **Prepare the AM3 Directory**: Move `AM3_ex_blazars.py`, `Docker_GUI`, `GUI_AM3.py`, `logo.png` to the AM$^3$ base directory. 2. **Docker Configuration**: - **Grant Docker Sudo Rights**: ```bash sudo usermod -aG docker ``` - **Start Docker** (if necessary): ```bash systemctl start docker ``` - **Pull Ubuntu Image**: ```bash docker pull ubuntu:22.04 ``` 3. **Build and Run Docker Image**: - Build: ```bash docker build -f Docker_GUI -t am3_gui . ``` - Run: ```bash docker run -d --rm --name am3_gui am3_gui tail -f /dev/null ``` 4. **Launch the GUI**: ```bash python3 GUI_AM3.py ``` ## Docker on Mac 1. **Prepare the AM3 Directory**: Move `AM3_ex_blazars.py`, `Docker_GUI`, `GUI_AM3.py`, `logo.png` to the AM$^3$ base directory. 2. **Docker Configuration**: - **Grant Docker Sudo Rights**: ```bash sudo usermod -aG docker ``` - **Start the Docker App** - **Pull Ubuntu Image**: For Mac Intel chip: ```bash docker pull ubuntu:22.04 ``` For Mac M1/2/3 systems: ```bash docker pull arm64v8/ubuntu:22.04 ``` 3. **Build and Run Docker Image**: - Build: ```bash docker build -f Docker_GUI -t am3_gui . ``` - Run: ```bash docker run -d --rm --name am3_gui am3_gui tail -f /dev/null ``` 4. **Launch the GUI**: ```bash python3 GUI_AM3.py ``` ## The GUI The GUI leverages a detailed AGN example with an external photon field. It operates with all speed-optimizing options enabled, evolving the system over XX dynamical timescales to reach a steady state. ### Parameters and Running To execute the code, click on `Launch Shell Script`. The GUI allows adjustment of the following parameters using sliders: #### Source Parameters - `R'_blob`: Radius of the emitting spherical blob. Slider for `log_10(R_blob/cm)`. - `B'`: Comoving magnetic field strength. Slider for `log_10(B/G)`. - `Gamma`: Bulk Lorentz factor of the blob. - `R_diss`: Dissipation radius. Slider for `log_10(R_diss/cm)`. - `z`: Redshift of the source. #### Electron Parameters - `gamma'_(e, min)`: Minimal Lorentz factor of the electrons. Slider for `log_10(gamma'_(e, min))`. - `gamma'_(e, max)`: Maximal Lorentz factor of the electrons. Slider for `log_10(gamma'_(e, max))`. - `p_e`: Powerlaw distribution index. - `L'_e`: Comoving luminosity in electrons. Slider for `log_10(L'_e/erg.cm^-1)`. #### Proton Parameters - `gamma'_(p, min)`: Minimal Lorentz factor of the protons. Slider for `log_10(gamma'_(p, min))`. - `gamma'_(p, max)`: Maximal Lorentz factor of the protons. Slider for `log_10(gamma'_(p, max))`. - `p_p`: Powerlaw distribution index. - `L'_p`: Comoving luminosity in protons. Slider for `log_10(L'_p/erg.cm^-1)`. #### External Fields Parameters - `M_BH`: Black hole mass. Slider for `log_10(M_BH/M_sun)`. - `L_disk`: Accretion disk luminosity. Slider for `log_10(L_disk/erg.cm^-1)`. - `T_torus`: Dust torus temperature. Slider for `log_10(T_torus/K)`. - `R_BLR`: Broad line region radius. Slider for `log_10(R_BLR/cm)`. - `R_torus`: Torus radius. Slider for `log_10(R_torus/cm)`. Options to disable components: - [ ] Turn off protons - [ ] Turn off external fields ### Plotting Running the code generates an `output` folder in the base directory containing: - Observed spectral energy distribution files - Comoving particle distributions - Cooling timescales These can be visualized in the GUI under: - *SED* - *Energy Densities* - *Timescales* The terminal panel (read-only mode) displays the evolution of various processes.