Skip to content

Commit

Permalink
Merge pull request #95 from nanograv/hotfix/use-metadata
Browse files Browse the repository at this point in the history
WIP: Updating PINT_Pal to work with PINT>=1.1
  • Loading branch information
rossjjennings authored Dec 18, 2024
2 parents 1cd26cf + 4b2c5cb commit 703613d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"ruamel.yaml",
"pint_pulsar==1.0.1",
"pint_pulsar>=1.1.1",
"enterprise-pulsar>=3.3.2",
"enterprise-extensions>=v2.4.1",
"pytest",
Expand All @@ -29,7 +29,7 @@ dependencies = [
"numpy",
"weasyprint",
"pytest-xdist[psutil]>=2.3.0",
"jupyter",
"notebook",
"seaborn",
"gitpython",
]
Expand Down
2 changes: 1 addition & 1 deletion src/pint_pal/noise_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def add_noise_to_model(model, burn_frac = 0.25, save_corner = True, no_corner_pl
#Setup and validate the timing model to ensure things are correct
model.setup()
model.validate()
model.noise_mtime = mtime.isot
model.meta['noise_mtime'] = mtime.isot

if convert_equad_to_t2:
from pint_pal.lite_utils import convert_enterprise_equads
Expand Down
6 changes: 3 additions & 3 deletions src/pint_pal/timingconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ def get_model_and_toas(self,usepickle=True,print_all_ignores=False,apply_initial
m = model.get_model(par_path,allow_name_mixing=True)
match = re.search(r"#\s+Created:\s+(\S+)", open(par_path).read())
if match:
m.created_time = match.group(1)
log.info(f"Par file created: {m.created_time}")
m.file_mtime = Time(os.path.getmtime(par_path), format="unix").isot
m.meta['created_time'] = match.group(1)
log.info(f"Par file created: {m.meta['created_time']}")
m.meta['file_mtime'] = Time(os.path.getmtime(par_path), format="unix").isot


if m.PSR.value != self.get_source():
Expand Down

0 comments on commit 703613d

Please sign in to comment.