Skip to content

Commit 18a2cca

Browse files
author
Bill Wolf
authored
Fix headers in README
1 parent 33b4d4b commit 18a2cca

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
MesaScript
22
==========
33

4-
###MESA Requirement!
4+
### MESA Requirement!
55
In its current state, MesaScript requires MESA rev. 5596 or above. This is due
66
to a sensitivity to where the `'.inc'` files are stored on earlier versions. If
77
there is demand for MesaScript for earlier revisions, I will look into making
88
it backward compatible.
99

10-
###The Short Short Version
10+
### The Short Short Version
1111
To get up and running fast, skip to installation, then try and use the included
1212
sample file, `sample.rb` (via running `ruby sample.rb` in the command line). The
1313
comments in `sample.rb` should get you started, especially if you have at least
1414
a little Ruby know-how.
15-
###What is MesaScript?
15+
### What is MesaScript?
1616
Lightweight, Ruby-based language that provides a powerful way to make inlists
1717
for MESA projects. Really, MesaScript is a DSL (domain-specific language) built
1818
on top of Ruby, so Ruby code "just works" inside MesaScript (if you're familiar
@@ -43,7 +43,7 @@ are pretty wide open. You could easily make a script that starts with a given
4343
set of parameters, run MESA star, then use the output of that run to dictate a
4444
new inlist and run, creating a chain (maybe a MESA root find of sorts).
4545

46-
###Installation
46+
### Installation
4747
MesaScript is now available as a gem! Assuming you have the `gem` command up
4848
and running (you probably do, but if not, check out
4949
[RubyGems](https://rubygems.org) to get it up and running). Simply run
@@ -91,7 +91,7 @@ work. The `mesa_script.rb` file generates all the necessary data it needs from
9191
the MESA source on the fly (this also makes it nearly MESA version
9292
independent).
9393

94-
###Basic Usage
94+
### Basic Usage
9595
The `mesa_script.rb` file defines just one class, Inlist, which we'll interact
9696
with primarily through one class method, `make_inlist`. Just put the following
9797
in a file to make a blank inlist:
@@ -113,14 +113,14 @@ by the way). Then to actually generate the inlist, enter
113113
MesaScript, and you did so using fewer lines than it would have taken to
114114
actually make that inlist on your own (technically)!
115115

116-
###Entering Inlist Commands
116+
### Entering Inlist Commands
117117
Making blank inlists is boring, so now let's cover how you actually make useful
118118
inlists. For mesa inlists, there are really only two types of declarations:
119119
those for scalars and those for array. Let's talk about scalars first, since
120120
they are far more common. Then we'll get to the more complicated array
121121
assignments.
122122

123-
####Scalar Assignments
123+
#### Scalar Assignments
124124
As an example, let's say we want to set the initial mass of our star to 2.0
125125
solar masses. The inlist command for this is `initial_mass`. In a regular
126126
inlist file, we would need to put this in the proper namelist, `&controls` as
@@ -143,7 +143,7 @@ called `initial_mass`. (For the person curious as to why I didn't program this
143143
functionality in, google something like "instance_eval setter method" to
144144
discover what took me too long to figure out.)
145145

146-
####Array Assignments
146+
#### Array Assignments
147147
As an example, let's say we want to set a lower limit on a certain central
148148
abundance as a stopping condition. Then we would, at the minimum, need to set
149149
the inlist command `xa_central_lower_limit_species(1) = 'h1'`, for example. In MesaScript, there are three ways to do this:
@@ -160,7 +160,7 @@ work:
160160
I tried to program this functionality in, and the kind people at
161161
[StackOverflow](http://stackoverflow.com/questions/21036873/how-do-i-write-a-method-to-edit-an-array-hash-using-parentheses-instead-of-squar/21044781?noredirect=1#21044781) kindly but firmly convinced me it was utterly impossible to to with Ruby without writing a parser of my own. Just stick to the bracket syntax or the less natural parentheses/space notations.
162162

163-
####Other Details
163+
#### Other Details
164164
That's really all you need to know to start making inlists with MesaScript,
165165
though I should remind you, especially if you aren't familiar with Ruby, about
166166
the basic types of entries you might use. Most inlist commands are one of the
@@ -218,10 +218,10 @@ inlist commands so you don't forget to change a particular command when you
218218
move on to a different run (like forgetting to change a `LOG_dir`, which I've
219219
done a few too many times and thus overwritten some data).
220220

221-
###Deeper and Deeper...
221+
### Deeper and Deeper...
222222
Are you still reading this? Well, you must want to do more.
223223

224-
###Using Custom Namelists
224+
### Using Custom Namelists
225225
You can also make MesaScript know about additional namelists (or forget about
226226
the standard three). After requiring the `mesa_script` file, you can change the
227227
namelists it cares about via the following commands (obviously subbing out any
@@ -252,7 +252,7 @@ That *should* set things up to work with custom namelists, so long as the
252252
`.inc` and `.defaults` files are formatted more or less the same as the "stock"
253253
ones.
254254

255-
###Accessing Current Values and Displaying Default Values
255+
### Accessing Current Values and Displaying Default Values
256256
Perhaps you want to display a default value in your inlist, but not actually
257257
change it. Well, most of the assignment methods mentioned earlier
258258
are also getter methods. I haven't mentioned how these methods actually work, so I'll do so now since you're still reading this manifesto.
@@ -297,5 +297,5 @@ Note that these array methods, as indicated, point to hashes (not arrays) of
297297
values. So `xa_central_lower_limit_species[1] = 'h1'` would return
298298
`{1 => 'h1'}`.
299299

300-
##Further Work
300+
## Further Work
301301
I warmly welcome bug reports, feature suggestions, and most all, pull requests!

0 commit comments

Comments
 (0)