Skip to content

Commit

Permalink
removed some comments, fixed up OpacitySolver initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodot- committed Aug 8, 2024
1 parent 30412b0 commit cfff15f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
6 changes: 1 addition & 5 deletions tardis/opacities/macro_atom/macroatom_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
from tardis.opacities.macro_atom.macroatom_state import MacroAtomState


class MacroAtomSolver(
object
): # Possibly make two classes, one for normal and one for continuum
class MacroAtomSolver(object):

initialize: bool = True
normalize: bool = True
Expand Down Expand Up @@ -111,8 +109,6 @@ def solve(
State of the macro atom ready to be placed into the OpacityState
"""

# TODO: Figure out how to calculate p_combined, Check TransitionProbabilitiesProperty in assemble_plasma, properties/base.py
# Make the combined transition probabilities something that is configurable in the class
transition_probabilities = (
self.solve_non_markov_transition_probabilities(
atomic_data,
Expand Down
9 changes: 5 additions & 4 deletions tardis/opacities/opacity_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ def __init__(

self.line_interaction_type = line_interaction_type
self.disable_line_scattering = disable_line_scattering
if (
self.line_interaction_type != "scatter" # TODO: Fix this
): # Need a switch to use the continuum solver
if self.line_interaction_type in (
"downbranch",
"macroatom",
):
if montecarlo_globals.CONTINUUM_PROCESSES_ENABLED:
self.macro_atom_solver = (
None # in the future will be the MacroAtomContinuum solver
Expand Down Expand Up @@ -87,7 +88,7 @@ def solve(self, legacy_plasma) -> OpacityState:
elif self.line_interaction_type in (
"downbranch",
"macroatom",
): # Need to pass though the continuum species
):
macroatom_state = self.macro_atom_solver.solve(
legacy_plasma,
atomic_data,
Expand Down

0 comments on commit cfff15f

Please sign in to comment.