Skip to content

Commit

Permalink
Fix column name
Browse files Browse the repository at this point in the history
  • Loading branch information
albrja committed Mar 6, 2025
1 parent d5b642d commit 4c95d34
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vivarium_gates_mncnh/components/lbwsg.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ class LBWSGPAFObserver(Component):

@property
def columns_required(self) -> list[str] | None:
return ["lbwsg_category"]
return ["lbwsg_category", "gestational_age_exposure"]

def __init__(self, target: str):
super().__init__()
Expand All @@ -390,9 +390,9 @@ def setup(self, builder: Builder) -> None:
# Add observer to get paf for preterm birth population
builder.results.register_adding_observation(
name=f"calculated_lbwsg_paf_on_{self.target}_preterm",
pop_filter='alive == "alive" and gestational_age < 37',
pop_filter='alive == "alive" and gestational_age_exposure < 37',
aggregator=self.calculate_paf,
requires_columns=["alive", "gestational_age"],
requires_columns=["alive", "gestational_age_exposure"],
additional_stratifications=self.config.include,
excluded_stratifications=self.config.exclude,
when="time_step__prepare",
Expand Down

0 comments on commit 4c95d34

Please sign in to comment.