|

View previous topic :: View next topic |
Author |
Message |
jventura

Joined: 04 Jan 2011 Posts: 294 Location: Portugal
|
Posted: Fri Mar 13, 2015 7:05 pm Post subject: flatlib - open source computer library |
|
|
Hi there,
something that disappoints me a lot in today's astrology software is that it is very difficult or even impossible to perform any kind of statistical research. For example, any statistically valid study requires a relatively large set of charts, something that is virtually impossible to be done one by one.
Moreover, most of the software is geared to modern astrology. These softwares tend to wrongly implement traditional techniques, causing at least misinterpretation. In most cases, traditional techniques are not implemented at all.
That's why I decided to open-source the most important part of the work I have been doing lately, which I've named flatlib.
Flatlib is an open-source computer library for Traditional Astrology. It is implemented in the Python 3 programming language, which makes it really friendly for developers and non-developers. The Python language is considered one of the most simple and user friendly modern programming languages.
Computing a chart in flatlib is as simple as:
>>> date = Datetime('2015/03/13', '17:00', '+00:00')
>>> pos = GeoPos('38n32', '8w54')
>>> chart = Chart(date, pos)
You can get planets, houses, angles and fixed stars from the chart, and access their properties.
>>> sun = chart.get(const.SUN)
>>> print(sun)
Sun Pisces +19:40:13 +00:59:57
>>> print(sun.element())
Fire
You can also get aspects between planets, or planets and other objects:
>>> sun = chart.get(const.SUN)
>>> moon = chart.get(const.MOON)
>>> aspect = aspects.getAspect(sun, moon, const.MAJOR_ASPECTS)
Moon Sun 90 Applicative +00:24:30
Future versions will also include essential and accidental dignities, primary directions, profections, planetary days and hours, solar returns, and a lot more.
Joćo Ventura
Last edited by jventura on Sun May 08, 2016 9:02 am; edited 4 times in total |
|
Back to top |
|
 |
jventura

Joined: 04 Jan 2011 Posts: 294 Location: Portugal
|
Posted: Fri Mar 13, 2015 7:51 pm Post subject: |
|
|
Some answers to possible questions:
Can everyone use it? Flatlib is open-source software so everyone is free to install and use it. However, since it is a programming library, some people may not be particularly inclined to use it since it requires some learning.
So is it not a end-user tool? Flatlib should really be seen as a traditional astrology software without a graphical user interface. Therefore, it is really powerful, since users can experiment without the "chains" of a graphical user interface.
How can I install it? Documentation is still scarce, but I hope to improve it in the future. You should install the latest Python 3 (3.4) and grab the flatlib package with pip3 install flatlib. This will install flatlib and its dependencies.
Is there a project page? You can check the code and simple documentation in the github page at https://github.com/flatangle/flatlib.
Are there any sample code? There's a "recipes" folder with some source code at https://github.com/flatangle/flatlib/tree/master/recipes. You can start with "aspects.py" which is at https://github.com/flatangle/flatlib/blob/master/recipes/aspects.py.
Can I use it on my own work? Absolutely yes, you are free to use it in your own projects. The flatlib source code is released under an MIT License, which allows it to be used also on commercial projects. There is a caveat though: flatlib uses the swiss ephemeris which is licensed GPL. Therefore, if you want to use flatlib in your commercial projects, you must adhere to the GPL license or buy a Swiss Ephemeris commercial license.
Why are you open-sourcing flatlib? I really want to help push forward data-driven research in astrology. That is only possible with a strong community of researchers and good tools, so there was no point in keeping flatlib hidden on my hard disk. Flatlib is also a good tool for talking about astrology techniques. Someone can always point to the source code to explain how things can be done. For instance, this is how aspects are implemented and this is how solar returns are computed.
Can I contribute to the project? I accept contributions such as code and documentation, although I suggest to wait a while since things are not stable yet. The best contribution for now is to spread the news about the existence of this project. |
|
Back to top |
|
 |
jventura

Joined: 04 Jan 2011 Posts: 294 Location: Portugal
|
Posted: Wed Mar 18, 2015 12:55 pm Post subject: |
|
|
Hi there,
I've just released flatlib 0.1.1. It now includes the computation of Essential Dignities..
Code: |
# Build a chart for a date and location
>>> date = Datetime('2015/03/13', '17:00', '+00:00')
>>> pos = GeoPos('38n32', '8w54')
>>> chart = Chart(date, pos)
# Get the Asc ruler
>>> asc = chart.get(const.ASC)
>>> ascRulerID = essential.ruler(asc.sign)
>>> ascRuler = chart.get(ascRulerID)
>>> print(ascRuler)
Mercury Pisces +00:48:57 +01:29:49
# Print Asc Ruler score
>>> info = essential.EssentialInfo(ascRuler)
>>> print(info.score)
|
You can check the source code in the github page (https://github.com/flatangle/flatlib), and install it in your Python environment using pip3 install flatlib --upgrade.
Joćo Ventura |
|
Back to top |
|
 |
jventura

Joined: 04 Jan 2011 Posts: 294 Location: Portugal
|
Posted: Tue Mar 31, 2015 12:08 pm Post subject: |
|
|
Hello,
for those who have been following my work on flatlib, I have now included support for handling planetary rulers. You can now do something like:
Code: |
# Build a date and location
>>> date = Datetime('2015/03/13', '17:00', '+00:00')
>>> pos = GeoPos('38n32', '8w54')
# Get the Planetary Hour table
>>> hourTable = planetarytime.getHourTable(date, pos)
>>> hourTable.dayRuler()
Venus
>>> hourTable.nightRuler()
Mars
>>> hourTable.hourRuler()
Saturn
>>> info = hourTable.currInfo()
>>> info['hourNumber']
11
|
You can find flatlib at github: https://github.com/flatangle/flatlib
Joćo Ventura |
|
Back to top |
|
 |
skyrack
Joined: 02 Aug 2012 Posts: 192 Location: Thailand
|
Posted: Wed Apr 08, 2015 11:58 am Post subject: |
|
|
Interesting.
Thanks a lot. |
|
Back to top |
|
 |
jventura

Joined: 04 Jan 2011 Posts: 294 Location: Portugal
|
Posted: Wed Apr 08, 2015 12:54 pm Post subject: |
|
|
Hello everyone,
I've just released version 0.2.0 which includes many new features and bug fixes, such as:
- Planetary time
- Arabic Parts
- Chart Dynamics
- Accidental dignities
- Predictives (Profections, Solar Returns and Primary Directions)
- Protocols (Almutem, Temperament and Behavior calculations)
All basic features are now included and I will probably start working on some documentation.
Example of Accidental Dignities:
Code: |
# Build a chart for a date and location
>>> date = Datetime('2015/03/13', '17:00', '+00:00')
>>> pos = GeoPos('38n32', '8w54')
>>> chart = Chart(date, pos)
# Build AccidentalDignity class for Venus
>>> venus = chart.get(const.VENUS)
>>> aDign = AccidentalDignity(venus, chart)
# Venus haiz
>>> haiz = aDign.haiz()
>>> print(haiz)
Contra-haiz
# Venus accidental dignity score
>>> score = aDign.score()
>>> print(score)
6
|
Source code: https://github.com/flatangle/flatlib/
Python package: https://pypi.python.org/pypi/flatlib
Joćo Ventura |
|
Back to top |
|
 |
skyrack
Joined: 02 Aug 2012 Posts: 192 Location: Thailand
|
Posted: Wed Apr 15, 2015 12:48 pm Post subject: |
|
|
Joćo,
A big thank you from me!
And thanks for your help in getting this installed on my Windows machine.
That help is now documented and should make things a lot easier for all to install now.
Skyrack |
|
Back to top |
|
 |
jventura

Joined: 04 Jan 2011 Posts: 294 Location: Portugal
|
Posted: Wed Apr 15, 2015 1:29 pm Post subject: |
|
|
Hello everyone,
with a little help from @skyrack, I started to document some things regarding this library. You can find the documentation at http://flatlib.readthedocs.org/.
For now it only includes basic instructions to install flatlib from sources in Windows (other OSes will follow), and a FAQ (as above). I will keep improving the documentation, and I am planning to include also some tutorials for those who want to have a go but don't know how to start.
It is a work in progress, but things are slowly starting to take shape..
Regards,
Joćo Ventura |
|
Back to top |
|
 |
jventura

Joined: 04 Jan 2011 Posts: 294 Location: Portugal
|
Posted: Wed Apr 22, 2015 11:07 am Post subject: |
|
|
Hello everyone,
I've just created a new tutorial which provides enough knowledge about the Python programming language to get people started with flatlib. You can find the tutorials' index at http://flatlib.readthedocs.org/en/latest/tutorials/index.html
The next tutorials will focus on flatlib itself and I will post here as I get things done..
Joćo Ventura |
|
Back to top |
|
 |
jventura

Joined: 04 Jan 2011 Posts: 294 Location: Portugal
|
|
Back to top |
|
 |
jventura

Joined: 04 Jan 2011 Posts: 294 Location: Portugal
|
Posted: Sat May 07, 2016 7:57 pm Post subject: |
|
|
Hi there, I've just released flatlib 0.2.1 on PyPI (https://pypi.python.org/pypi/flatlib).
This is the changelog for this version:
* Added Pars Horsemanship
* Return accidental dignities that score more than zero
* Added chartdynamics.disposits to return dignities where planet A disposes a planet B
* Includes new Triplicity Faces
Joćo Ventura |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
-
|
.
Powered by phpBB © 2001, 2005 phpBB Group
|
|