Skip to content

Instantly share code, notes, and snippets.

View ngiann's full-sized avatar

Nikos Gianniotis ngiann

View GitHub Profile
@ngiann
ngiann / examplescript.jl
Last active February 1, 2022 21:13
Investigate transfer function behaviour
using TransferFunctions
# Following transfer functions exhibit slanted line
plot(PhysicalTransferFunctionEddington(mass = 2.8e9, eddingtonfraction = 10.0, wavelength = 5000.0))
plot(PhysicalTransferFunctionEddington(mass = 7.2e9, eddingtonfraction = 10.0, wavelength = 5000.0))
@ngiann
ngiann / width_of_transfer_function.jl
Last active February 2, 2022 21:53
inspection of transfer function widths
using TransferFunctions, MiscUtil, PyPlot
lambda = 5700;
masses = collect(logrange(1e5, 1e10, 1000));
# given mass value, return the width of the instantiated transfer function
function f(mass)
width(PhysicalTransferFunctionEddington(mass = mass, eddingtonfraction = 10.0, wavelength = lambda))
@ngiann
ngiann / jumptransferfunction.jl
Last active February 3, 2022 21:28
Inspecting transfer function behaviour
using TransferFunctions, Printf, PyPlot
# define a range of masses around where the jump occurs
masses = [2.89; 2.90; 2.91; 2.92; 2.93; 2.94; 2.95] * 1e9
wavelength, accretion = 5000.0, 1.0
for m in masses
@ngiann
ngiann / simplescript_equation_8.jl
Created February 7, 2024 21:31
Building block - equation 8
### A Pluto.jl notebook ###
# v0.19.38
using Markdown
using InteractiveUtils
# ╔═╡ ee4a26c0-c5f2-11ee-0a49-d127ee59691c
using Plots, Optim
# ╔═╡ 22d957be-1883-47a3-b1e2-94d152bd46b2