Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log Bins for snowglobes.py #206

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 0 additions & 79 deletions python/snewpy/data_handlers.py

This file was deleted.

72 changes: 0 additions & 72 deletions python/snewpy/log_bins.py

This file was deleted.

11 changes: 0 additions & 11 deletions python/snewpy/snowglobes.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,6 @@ def generate_time_series(model_path, model_type, transformation_type, d, output_

# now process log data
if (log_bins==True):
JostMigenda marked this conversation as resolved.
Show resolved Hide resolved
needed_offset = -1*u.s
# need to offset the times so no negatives
#if tedges[0] < 0:
#needed_offset = tedges[0] + 0.0001*u.s
#tedges = tedges + tedges[0] + 0.0001*u.s #shift so it's very close to 0
#tmin = 0.0001*u.s
#tmax+=tmin
log_edges = np.asarray([])

if tmax < 0 or tmin < 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn’t these be <=0?

Expand All @@ -115,11 +108,7 @@ def generate_time_series(model_path, model_type, transformation_type, d, output_
raise ValueError("Cannot use negative time coordinates in log scale. Consider adjusting model time window");
log_edges = np.append(log_edges,t)
log_edges = log_edges*u.s
#if needed_offset>-1*u.s:
#keep in mind needed_offset will still be a negative number here
#log_edges = log_edges + needed_offset
times = 0.5*(log_edges[1:] + log_edges[:-1])
print(f'Proceeding with {len(times)} bin(s)')

# Generate output.
if output_filename is not None:
Expand Down