This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
this takes the backup file from the Fast Notepad android app and saves every | |
note as an individual file. loses info on folder hierarchy, it probably is | |
buggy and may need tweaking but it was sufficient for my purposes... | |
Requirements: | |
python 3+ | |
To use: | |
1. edit the fname, output_dir and output_format vars below |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function manual_lau_holtzman_fig2() | |
% recreate fig 2 of lau and holtzman 2019 grl | |
% https://doi.org/10.1029/2019GL083529 | |
beta = 1e-4 | |
alf = 1/3 | |
Mu_in = 60*1e9; | |
eta_ss = 1.8922e+21; | |
tau_M = eta_ss / Mu_in; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
to store: | |
$ python manual_grid_val_test.py 1 | |
to compare | |
$ python manual_grid_val_test.py 0 | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import yt | |
from yt.units import Mpc | |
from yt.visualization.api import Streamlines | |
from yt.visualization.volume_rendering.api import LineSource | |
import numpy as np | |
# streamline alpha value: determines opacity of LineSource | |
# objects. A bit of trial and error to pick a good value | |
# so that both the volume rendering and the lines show up. | |
# this value works for the transfer function used below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import yt.utilities.linear_interpolators as lin | |
from yt.testing import fake_random_ds | |
import time | |
import matplotlib.pyplot as plt | |
times_3d_eval = [] | |
times_3d_init = [] | |
Nvals_3d = 2 ** np.arange(3, 9) | |
for n in Nvals_3d: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import yt | |
ds = yt.load_sample("gizmo_64") # 3ish GB download | |
center = ds.domain_center.to('Mpc').d | |
z_hat_original = ds.arr([0.3, 0.3, 0.3], 'kpc') | |
y_hat_original = ds.arr([1., 0., 0.], 'kpc') | |
for x_loc in list(range(2,19,1)): | |
c = ((x_loc, center[1], center[2]), 'Mpc') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import numpy as np | |
import yt | |
import yt_idv | |
# yt reminder: phi is the polar angle (0 to 2pi) | |
# theta is the angle from north (0 to pi) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/yt/_typing.py b/yt/_typing.py | |
index 0062c63dd..15fcd8a6f 100644 | |
--- a/yt/_typing.py | |
+++ b/yt/_typing.py | |
@@ -1,4 +1,4 @@ | |
-from typing import List, Optional, Tuple, Union | |
+from typing import Any, Callable, Dict, List, Optional, Tuple, Union | |
import unyt as un | |
from numpy import ndarray |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder