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

Method to find number of cycles OS dependant #68

Open
Samuel316 opened this issue Sep 3, 2019 · 0 comments
Open

Method to find number of cycles OS dependant #68

Samuel316 opened this issue Sep 3, 2019 · 0 comments

Comments

@Samuel316
Copy link

NuGridPy/nugridpy/mesa.py

Lines 915 to 918 in 1f21ffa

cmd=os.popen('wc '+sldir+'/'+slaname)
cmd_out=cmd.readline()
cnum_cycles=cmd_out.split()[0]
num_cycles=int(cnum_cycles) - 6

It would be easy to replace this with pure python code, but It only seems to be used as an in input to:

def _read_mesafile(filename,data_rows=0,only='all'):

as data_rows which is 0 by default?

Some of these private functions could probably be merged. At some point the whole file is read into memory for the plot so why is it read in separately to find its length?

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

No branches or pull requests

1 participant