Skip to content

Commit

Permalink
Modify buffy city and source with new create timestamp function
Browse files Browse the repository at this point in the history
  • Loading branch information
MCruces-fz committed Apr 7, 2021
1 parent a84e91d commit 5685a0d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions invisible_cities/cities/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,7 @@ def mcsensors_from_file(paths : List[str],
Rate value in base unit (ns^-1) to generate timestamps
"""

if rate == 0:
warnings.warn("Zero rate is unphysical, using set period of 1 ms instead",
category=UserWarning)
timestamp = create_timestamp(rate)

pmt_ids = load_db.DataPMT(db_file, run_number).SensorID

Expand All @@ -428,8 +426,6 @@ def mcsensors_from_file(paths : List[str],

for evt in mcinfo_io.get_event_numbers_in_file(file_name):

timestamp = create_timestamp(evt, rate) / units.ms

try:
## Assumes two types of sensor, all non pmt
## assumed to be sipms. NEW, NEXT100 and DEMOPP safe
Expand All @@ -441,7 +437,7 @@ def mcsensors_from_file(paths : List[str],
pmt_resp = sipm_resp = pd.DataFrame(columns=sns_resp.columns)

yield dict(event_number = evt ,
timestamp = timestamp,
timestamp = timestamp(evt),
pmt_resp = pmt_resp ,
sipm_resp = sipm_resp)

Expand Down

0 comments on commit 5685a0d

Please sign in to comment.