Skip to main content

Starspot modeling

Project description

Python wrapper module for macula starspot code:

% git clone
% cd pymacula
% python install

If you come across an error in the installation regarding something like undefined reference to main, then you may have to install with

% FFLAGS=-fPIC LDFLAGS=-shared python install


You can generate a random starspot model:

>>> from pymacula import MaculaModel
>>> model = MaculaModel() #default is 3 random spots; use nspots keyword for different number

You can call the model at random times, e.g., for plotting:

>>> import numpy as np
>>> import matplotlib.pyplot as plt
>>> ts = np.arange(0,100,0.1)
>>> plt.plot(ts, model(ts))

You can also make a model with non-default star parameters:

>>> model = MaculaModel(star={'Peq':15}) #rotation period of 15 days instead of default 30

Project details

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page