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

zbpetersbuf is doing fft / inverse fft #3

Closed
zbpetersbuf opened this issue Nov 1, 2024 · 6 comments · Fixed by #12
Closed

zbpetersbuf is doing fft / inverse fft #3

zbpetersbuf opened this issue Nov 1, 2024 · 6 comments · Fixed by #12
Assignees
Labels
python python related

Comments

@zbpetersbuf
Copy link
Contributor

fft / inverse fft using numpy and calculating the actual frequency in useful units (due monday)

@zbpetersbuf zbpetersbuf added this to the fft / inverse fft milestone Nov 2, 2024
@zbpetersbuf zbpetersbuf added the python python related label Nov 2, 2024
@zbpetersbuf
Copy link
Contributor Author

So I think im making a function to plot the frequency data. But the selection of frequencies, does that come from a function I make or just by looking at the graph of the invfft?

@laserlab
Copy link
Contributor

laserlab commented Nov 2, 2024

So I think im making a function to plot the frequency data. But the selection of frequencies, does that come from a function I make or just by looking at the graph of the invfft?

Do not make a function to plot. Please follow the homework task!

  • a function that uses numpy inside a module called preparation.py
  • the function should assume as an input a pandas time series with the index being a datetime object and the data being the concentration of CO2
  • a function that is calculating the actual frequency in useful units

so please focus on those tasks and not plotting. If you need some example data to see what your function should do take this:

import pandas as pd
import numpy as np

data = pd.Series(np.sin(range(0,10)),index=range(0,10))

@laserlab laserlab linked a pull request Nov 2, 2024 that will close this issue
@zbpetersbuf
Copy link
Contributor Author

1 so I have already did a couple things since I was unsure, should I delete the part that plots the inverse fft?
2 also should I include a read me or just a description in the modules where the function is located
3 also I was working on a unit test aswell should I delete this?

@laserlab
Copy link
Contributor

laserlab commented Nov 2, 2024

So all functions you do need a docstring in the same file and a unit test in test_preparation.py

@zbpetersbuf
Copy link
Contributor Author

so the index being a datetime object I would need to know what this looks like before I finish the pull request, since if its in pure seconds then I do nothing but if its in month, day, year, time then the function for finding frequency would look different

@laserlab
Copy link
Contributor

laserlab commented Nov 4, 2024

so the index being a datetime object I would need to know what this looks like before I finish the pull request, since if its in pure seconds then I do nothing but if its in month, day, year, time then the function for finding frequency would look different

That’s exactly the point. But since it is a datetime object you know what it is! so you can convert it e.g. in seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python python related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants