Astronomy Related Programs
Quick Links: BASIC,
C, TI-BASIC
As is usual with computer programs being released, these programs are under
copyright by me (James Marshall) and I retain all rights related to the
programs, other people can't sell them or claim them as their own, etc.,
etc., all other relevant legal stuff, etc. You get the idea. I guess you
could call it free/open source, so I'm not *requiring* any kind of payment.
However, if paying for them will make you feel better or if you just *want* to
compensate a former student for his work, e-mail me and I'll give you a postal
address you can use to mail me money or stuff. Or just check out the other
parts of my web site, look for wish lists, and send something that way. ;)
Oh yeah, there's no guarantee that these programs will always give the correct
results. You know how it is with programming, there's almost always things to
be fixed. I'm pretty sure that the apsidal motion programs are good since
I've used them for a few years and had a few publications based on the results
they gave. However, things written for classes may or may not be completely
correct, some more correct than others, etc. Basically I'm saying that you use
these programs at your own risk. :) If you check any of these programs out
and do find errors, I would really appreciate it if you could e-mail me and
let me know what the problem is (so that I can fix it if I get time) or how to
solve the problem (if you've figured out the correction I need to make).
Thanks.
If anyone out there is interested, I have some other programs and stuff I've
written for classes and other things I've had to do. I used to have program
descriptions up here, but since I've almost never been asked about them, why
take up extra space? :) If you might be interested in these other programs
e-mail me at dronak@yahoo.com
and I'll be happy to tell you what I've got (if I remember and can find the
stuff). If you can tell me what you're looking for, that would help me out,
too.
Note: These programs were written in Microsoft's QuickBASIC.
- apsidal3.bas (21k) -- My revision of a
program written by a previous Villanova student (Sean Carroll). It basically
calculates apsidal motion rates (classical and relativistic) for a system
when given the necessary information. By the way, this is number three because
I figure the original program was version 1, the revisions I made in summer
1995 updated the program to version 2, and the new revisions made last summer
(1996) make this version number 3. I fixed the v*sin(i) option so that it
now works correctly (some bugs slipped past unnoticed last time). If you still
have an old copy (version 2), please pick up this new version now.
- astclock.bas (9k) -- An astronomical
clock. It shows the time in local mean time (12 and 24 hour formats), Universal
time, local sidereal time, or Greenwich sidereal time, as well as a
constantly updated geocentric Julian Date and an hour angle (when given a
star's RA). A bug was found in the program which I have now corrected.
Thanks to Bruce Frederiksen for pointing it out to me.
- astclock.txt (20 bytes) -- A required data
file for the astclock program. All it has is the conversion *from* UT *to*
local time and the user's longitude in decimal degrees. These values could
actually be put inside the code if you don't like having another file around.
I just thought changing numbers in a file was easier than changing the code
and recompiling. The current values in the file are for Villanova, PA.
Rename to astclock.dat.
- apsmot.bas (22k) -- The one program that
combines o-c.bas, ephem.bas, and calc-apm.bas into one easier to use program.
It also adds a few things that aren't in the separate programs, such as
uncertainty calculations. The three separate programs can still be useful on
their own, so don't get rid of them if you have them already.
- calc-apm.bas (2k) -- This calculates an
apsidal motion rate for a system based on observations rather than theory.
- ephem.bas -- This calculates a new ephemeris
(T_min and period) for a system based on the observations and some calculations
which can be done with the o-c program.
- o-c.bas (7k) -- This program calculates the O-C
values (observed - calculated) for observed times of minima along with other
useful values like the epoch/cycle number and a value for how far away secondary
eclipse is from 0.5 phase (useful in the work I've been doing for stars with
large apsidal motions and thus changing phases for secondary eclipse).
- partecl.bas (9k) -- This program uses a
simple method for analyzing the light curves of partial eclipsing binaries and
gets a good estimate of the values needed for more detailed analysis methods.
The three programs o-c, ephem, and calc-apm can be used in series with the
output of each program being the input for the next. After some work, I
finished the apsmot program that combines all three programs. The apsmot
program is probably easier than running the three programs separately and it
also adds some uncertainty calculations to the mix. It automatically saves
all files and so is probably more useful in general. However, the other three
programs can still be useful on their own, so don't get rid of them. :) I
would also suggest using the apsidal3.bas program in combination with
apsmot.bas -- apsidal3.bas does theoretical calculations while apsmot.bas makes
calculations based on observations; together, they're a great pair. ;)
Non-Astronomy BASIC Programs
- einquote.bas -- A simple program that
randomly selects and prints a quote by Albert Einstein.
- murphlaw.bas -- A simple program that
randomly selects and prints one of Murphy's Laws.
Note: These programs were written in Microsoft's QuickC.
- minima.c (18k) -- Determines times of minima
for any variable system (given an initial time of minima and a period) for any
phase.
- sunmodel.c (24k) -- Makes a simple model of
a Sun-like star (i.e., up to about 3 solar masses at which point the
approximations used in the program start to break down). If you're interested
in knowing more about how this program works, you can look at the description
I wrote up about the calculations and theory
involved. I am aware that this calculation method is probably not the best way
of doing it, but it served my purposes well enough and I haven't had time to
play with it to try to make a better version.
Note: These were written in the Texas Instruments BASIC programming language.
The programs here should work correctly on the TI-85/86/89 calculators with
hopefully little to no modifications and seeing as how they're in BASIC, they
could probably be modified to work on other TI graphing calculators, too.
They are in ASCII text format, not TI program format. If you can't find
a practical way to send them to your calculator via a link cable, you can
always type them in as a last resort. I can also try sending you a program
file if you need it. You should check out this list of
ASCII conversion
codes if you're not familiar with reading text programs. Special codes
are used to represent symbols that are one character on the calculator but
but take more than one character to type out on the computer.
- date2jd (1k) -- Converts calendar date into
Julian Date.
- jd2date (1k) -- Converts Julian Date into
calendar date.
- kappa (4k) -- Computes opacities, flux, etc.
for a stellar model.
James Marshall
dronak@yahoo.com
(plain ASCII text only, please,
here's why)
This page was last updated on March 17, 2000.
Program(s) last added/changed on November 11, 1999.
This page has been visited
times since March 31, 2009. Free counter courtesy of
PHPJunkYard.com.
View standard disclaimer for my personal web pages.