[mesa-users] Profile name zero padding

Bill Paxton paxton at kitp.ucsb.edu
Fri Dec 5 11:04:30 EST 2014


Hi Ehsan,

The names of profiles are not intended to reflect the order in which they were produced.  The mapping from file name to model number is in the profiles.index.   That is all related to the design decision to enforce a user-specified limit on the number of profiles.  Once that limit is reached older profiles are discarded and replaced by new ones using the same filename.

If you don't like that scheme, please use the routine 'star_write_profile_info' found in star_lib -- it lets you give a filename for the profile as one of the args.  Call it periodically from your run_star_extras finish_step routine.

-Bill






On Dec 5, 2014, at 2:07 AM, Ehsan Moravveji wrote:

> Dear Bill,
> I would like to ask for a new feature regarding the profile names. 
> I find it a bit inconvenient that profile names are not zero padded from left, because when listing the stored profiles in the LOGS directory with “ls” command, or when using “glob” in python to fetch the list of available files, they are no longer returned in the order by which they were produced. E.g. profile11.data will appear after profile1.data, but before profile2.data. Left zero padding resolves this. This makes life easier (and happier :-D) when plotting profiles in sequential order.
> 
> Is it possible to allow zero padding with profile names, and give users control over the number of desired zeros to pad with?
> 
> Thanks for your supports.
> Ehsan.
> 
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141205/3ffcf6fd/attachment.html>


More information about the Mesa-users mailing list