Skip to content

Method to find number of cycles OS dependant #68

@Samuel316

Description

@Samuel316

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions