How can I access the source code with compiled .c modules ?

11 views
Skip to first unread message

aurelien.gourrier

unread,
May 17, 2008, 4:44:13 AM5/17/08
to Area Diffraction Machine
Hi guys,

I got in contact with Sam who suggested I join this mailing list. I am
very interested by this project since I'm also working at the ESRF on
scattering data. I would be interested to access the source code to
test the various modules, particularly the file handling ones. Is
there a complete tar file containing the code ? I saw that I could
access the modules directly from the web but I would need to compile
the .c files to python files and I haven't been clever enough to do
this so far... I'm using python 2.4.

Cheers,

Aure

joshu...@gmail.com

unread,
May 17, 2008, 4:40:43 PM5/17/08
to Area Diffraction Machine
Hi Aure. First, thanks for using my discussion group because it makes
my life a bunch easier. I am always excited for more interest in my
program. You have caught me at a little bit of an awkward time because
I am graduating from college tomorrow and my parents have come up for
commencement! On Wednesday I will be traveling for a week and a half
and probably out of contact. Nevertheless, I will do everything I can
to help you and will answer any questions that I possibly can. I just
might not be the most responsive for a little while.

First off, I built everything with python 2.5. I kind of doubt that I
did anything which wouldn't work with python 2.4 but if this causes
you problems, you might need to move up to 2.5. Sorry.

You can actually build these modules by yourself. This is probably the
right thing to do because they build differently on Linux, Mac, and
Windows (and I have no idea if Vista vs XP will cause any issues).

Anyway, I have a setup script next to the .c files which you can run
with with command "python setup.py build". It will compile the .c
modules and put them in python's path. By the way, if you are using
Windows, this will only work if you have install Microsoft Visual
Studio (which was originally used to build Python on Windows). I don't
own Microsoft Visual Studio and there is a workaround by building
extensions with GCC using the free and open source MinGW. On the
Google Code wiki page BuildOnWindows (http://code.google.com/p/
areadiffractionmachine/wiki/BuildOnWindows) I describe all of the
steps that I had to go through to build my program on windows using
MinGW. It is a little bit of a pain (especially because you also have
to build the C package levmar that the program uses) but if you follow
my instructions, it shouldn't take too long.

On the wiki (http://code.google.com/p/areadiffractionmachine/w/list),
I also have instructions for building the program on the Mac and
Linux.

By the way, I had a discussion with a couple of people at the ESRF
about read in .edf data and am using code from PyMCA to read in the
data. The discussion was archived here:
http://groups.google.com/group/area-diffraction-machine/browse_thread/thread/ab6fdfa81f619634

Also, I don't think I am quite reading in bruker data properly. A
discussion about this is here:
http://groups.google.com/group/area-diffraction-machine/browse_thread/thread/8f2a3b2f12a5f1c0.

Also, I just realized that I forgot to upload the manual that I have
been writing for the program. As of right now, you can find the manual
on the Downloads page. It might help answer some of your questions.

Also, I have been working on a version 2 of the program which should
be better then version 1. http://areadiffractionmachine.googlecode.com/svn/trunk/source/ChangeLog.txt
is a list of all of the changes that I have added to the program.
Version 2 is still in beta and probably has some bugs still in it.

If you have any more questions, comments, concerns, issues, or
whatever else, please feel free to ask me and I will do all that I can
to help.

Josh Lande

On May 17, 4:44 am, "aurelien.gourrier" <aurelien.gourr...@yahoo.fr>
wrote:
Reply all
Reply to author
Forward
0 new messages