Skip to content

Instantly share code, notes, and snippets.

View dutta-alankar's full-sized avatar
:octocat:
Yohoooo

Alankar Dutta dutta-alankar

:octocat:
Yohoooo
View GitHub Profile
@dutta-alankar
dutta-alankar / mass-cold+dense-color-time.svg
Last active October 16, 2025 10:53
A plot of mass as a function of distance colored by time (see Fig. 8 from paper Fading in the Flow; MNRAS for an alternate version)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
! Use a nice truetype font and size by default...
xterm*faceName: DejaVu Sans Mono Book
xterm*faceSize: 22
! Every shell is a login shell by default (for inclusion of all necessary environment variables)
xterm*loginshell: true
! I like a LOT of scrollback...
@dutta-alankar
dutta-alankar / freya-slurm-script.sh
Created July 3, 2025 07:37
Slurm script for Freya on MPCDF
#!/bin/bash
# Standard output and error:
#SBATCH -o ./tjob.%x.out.%j
#SBATCH -e ./tjob.%x.err.%j
#SBATCH --job-name="CCtest"
#
# Number of nodes and MPI tasks per node:
#SBATCH --nodes=15
#SBATCH --ntasks-per-node=40
@dutta-alankar
dutta-alankar / stencil-demo.chpl
Created June 24, 2025 08:19
Demonstration of stencil distribution on Chapel
import StencilDist.stencilDist;
import StencilDist.boundaries;
const side_low = 1;
const side_high = -1;
config const n = 10;
config const nghost = 2;
config const periodic = false;
const Space = {1..n};
const AllSpace = Space.expand((nghost,));
@dutta-alankar
dutta-alankar / gadget4-compile-script.sh
Created June 18, 2025 11:03
Gadget4 compile command
#!/bin/bash
module purge && module load gcc/11 openmpi/4 hdf5-mpi/1.14.1 gsl/2.7 fftw-mpi/3.3.9
export LD_LIBRARY_PATH="/mpcdf/soft/SLE_15/packages/skylake/openmpi/gcc_11-11.2.0/4.0.7/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/mpcdf/soft/SLE_15/packages/skylake/gsl/gcc_11-11.2.0/2.7.1/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/mpcdf/soft/SLE_15/packages/skylake/fftw/gcc_11-11.2.0-openmpi_4-4.0.7/3.3.9/lib:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="/mpcdf/soft/SLE_15/packages/skylake/hdf5/gcc_11-11.2.0-openmpi_4-4.0.7/1.14.1/lib:$LD_LIBRARY_PATH"
export GADGET4_DIR="/orion/ptmp/adutt/arepo-multi-zoom/gadget-files/gadget4_development"
export PROB_DIR="/orion/ptmp/adutt/arepo-multi-zoom/gadget-files/gadget4_development/examples/multi-zoom/zoom"
@dutta-alankar
dutta-alankar / Orion Gadget4-slurm-script
Created June 18, 2025 11:01
Gadget4-slurm-script on Orion
#!/bin/bash -l
# Standard output and error:
#SBATCH -o ./tjob.%x.out.%j
#SBATCH -e ./tjob.%x.err.%j
#SBATCH --job-name="MZ_p-g4"
#
# Number of nodes and MPI tasks per node:
#SBATCH --nodes=15
#SBATCH --ntasks-per-node=112
@dutta-alankar
dutta-alankar / auto-pptx-maker.py
Created May 20, 2025 08:25
Create pptx from images
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue May 20 10:18:24 2025
@author: alankar
install module python-pptx
"""
from pptx import Presentation
@dutta-alankar
dutta-alankar / FB22wOur-wind.svg
Last active August 14, 2025 12:34
Full FB22 versus our params plot
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dutta-alankar
dutta-alankar / absorption_tests.py
Created April 30, 2025 08:28
Create absorption from `AthenaK` data using `absorption_line_profile_calculator.py`
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 17 15:20:28 2023
@author: alankar
"""
import sys
import numpy as np
import yt
@dutta-alankar
dutta-alankar / absorption_line_profile_calculator.py
Created April 30, 2025 08:26
Calculate absorption profiles
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 17 12:22:19 2023
@author: alankar
"""
import numpy as np
from scipy.special import voigt_profile
import astropy.constants as const