Skip to content

Update iFAMS_zerocharge.py #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 9 additions & 0 deletions iFAMS_zerocharge.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,18 @@
namebase = os.path.splitext(file_name)[0]
xfull = []
yfull = []
#
# I notice you call range(0,len(l)) a lot and it is unnecessary as python handles list iteration for you.
# Try this instead:
# chargestateints = [int(chargestate) for chargestate in chargestatesr]
chargestateints = [int(chargestatesr[i]) for i in range(0,len(chargestatesr))]

######### opens each ifft file, and makes one list of lists composed of all of the files ###################
# Try this instead:
# for chargestate in chargestatesr:
# but it's not clear to me why you are iterating over one list and then using values for the other parallel list.
# is it really necessary to have two parallel lists? maybe you could just to the float(?)->int()->str() conversion
# inline?
for i in range (0,len(chargestatesr)):
ifftfilename = 0
iftstring = "IFFT"
Expand Down