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

Code to reproduce JOSS figure #140

Merged
merged 6 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
151 changes: 151 additions & 0 deletions docs/notebooks/example_figure_joss.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/notebooks/plot_class.ipynb
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure why this file ended up in the commit; I shouldn't have changed anything there and for some reason git diff does not return any difference between my commit and the joss-paper branch for this file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Apparently the image generated must be slightly different, this is the only line highlighted (once you commited git diff will not show the diff anymore), you can do git diff HEAD~1 to get the diff of the last commit.

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions ramp/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ def initialize(
# format datetimeindex in minutes
self.__datetimeindex = pd.date_range(
start=self.days[0],
end=self.days[-1] + pd.Timedelta(1, "d") - pd.Timedelta(1, "T"),
freq="T",
end=self.days[-1] + pd.Timedelta(1, "d") - pd.Timedelta(1, "min"),
freq="min",
)

@property
Expand Down Expand Up @@ -1399,10 +1399,14 @@ def windows(
) # same as above for window3

self.random_var_1 = int(
random_var_w * np.diff(self.window_1)
random_var_w * np.diff(self.window_1)[0]
) # calculate the random variability of window1, i.e. the maximum range of time they can be enlarged or shortened
self.random_var_2 = int(random_var_w * np.diff(self.window_2)) # same as above
self.random_var_3 = int(random_var_w * np.diff(self.window_3)) # same as above
self.random_var_2 = int(
random_var_w * np.diff(self.window_2)[0]
) # same as above
self.random_var_3 = int(
random_var_w * np.diff(self.window_3)[0]
) # same as above

# automatically appends the appliance to the user's appliance list
self.user._add_appliance_instance(self)
Expand Down
Loading