Skip to content

Commit ccce5a6

Browse files
Merge pull request #40 from padma18-vb/main
Producing variable snapshots of AGN disk + convolving with microlensing maps
2 parents c172765 + 4baa2c8 commit ccce5a6

File tree

6 files changed

+6775
-25
lines changed

6 files changed

+6775
-25
lines changed

amoeba/Notebooks/AmoebaExamples.ipynb

Lines changed: 2353 additions & 0 deletions
Large diffs are not rendered by default.

amoeba/Notebooks/clean.ipynb

Lines changed: 1345 additions & 0 deletions
Large diffs are not rendered by default.

amoeba/Notebooks/padma.ipynb

Lines changed: 2274 additions & 0 deletions
Large diffs are not rendered by default.

amoeba/src/amoeba/Classes/accretion_disk.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ def __init__(
9999
* 2
100100
/ np.size(self.temp_array, 0)
101101
)
102+
print('pixel_size: ',self.pixel_size)
103+
print('gravitational_radius given bh mass: ',self.rg)
104+
print('maximum radius of accretion disk in r_g: ',self.r_out_in_gravitational_radii)
105+
print('np.size(self.temp_array, 0): ',np.size(self.temp_array, 0))
106+
102107
self.corona_height = corona_height
103108

104109
def calculate_surface_intensity_map(
@@ -323,15 +328,14 @@ def generate_snapshots(
323328
:return: a list of snapshots of the accretion disk at each time step. Note that
324329
this is an experimental method.
325330
"""
326-
327331
rest_frame_wavelength_in_nm = (
328332
observer_frame_wavelength_in_nm / (1 + self.redshift_source) / self.g_array
329333
)
330334

331335
if corona_height is None:
332336
corona_height = self.corona_height
333337

334-
radiation_patterns = generate_snapshots_of_radiation_pattern(
338+
radiation_patterns, tl_arr = generate_snapshots_of_radiation_pattern(
335339
rest_frame_wavelength_in_nm,
336340
time_stamps,
337341
self.temp_array,
@@ -365,7 +369,7 @@ def generate_snapshots(
365369

366370
radiation_patterns_flux_projections.append(current_projection)
367371

368-
return radiation_patterns_flux_projections
372+
return radiation_patterns_flux_projections, tl_arr
369373

370374
def get_plotting_axes(self):
371375
"""Method to get plotting axes for the accretion disk. Useful for plotting any

amoeba/src/amoeba/Classes/magnification_map.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def __init__(
9898
* self.total_microlens_einstein_radii
9999
/ self.resolution
100100
)
101+
# print('pixel_size: ',self.pixel_size)
101102
self.pixel_shift = 0
102103

103104
def convolve_with_flux_projection(
@@ -152,6 +153,8 @@ def pull_light_curve(
152153
phi_travel_direction=None,
153154
weight_by_macromag=False,
154155
return_track_coords=False,
156+
return_sub_grids=False,
157+
grid_length=10,
155158
random_seed=None,
156159
):
157160
"""Calculate the values of a light curve. By default, the light curve will be
@@ -187,6 +190,8 @@ def pull_light_curve(
187190
y_start_position=y_start_position,
188191
phi_travel_direction=phi_travel_direction,
189192
return_track_coords=return_track_coords,
193+
return_sub_grids=return_sub_grids,
194+
grid_length=grid_length,
190195
random_seed=random_seed,
191196
)
192197
if weight_by_macromag:
@@ -215,6 +220,7 @@ def calculate_microlensed_transfer_function(
215220
return_descaled_response_array_and_lags=False,
216221
return_magnification_map_crop=False,
217222
random_seed=None,
223+
disk_tf = None,
218224
):
219225
"""Calculate the transfer function of an accretion disk when the response map is
220226
microlensed at a particular location.
@@ -282,6 +288,7 @@ def calculate_microlensed_transfer_function(
282288
return_descaled_response_array_and_lags=return_descaled_response_array_and_lags,
283289
return_magnification_map_crop=return_magnification_map_crop,
284290
random_seed=random_seed,
291+
disk_tf=disk_tf
285292
)
286293

287294

0 commit comments

Comments
 (0)