2011-05-17 08:57:01

Today, I ran some tests with pypy and my few Project Euler solutions:

Solution Python 2.6.6 PyPy 1.5 Factor
7 9.57s 1.92s 4.98
7_b 0.52s 0.14s 3.71
9 0.51s 0.10s 5.1
14 6.70s 6.97s 0.96
25 1.25s 0.68s 1.83

I guess the main message to take home is (see especially 7 and 7_b): a good algorithm is way more important then the interpreter, but if you can choose (e.g. you don't need numpy), then why not use PyPy and gain some speed?


blog python pypy projecteuler

Comments:



2011-05-10 17:01:24

Today was another wasted day, mostly caused by Latex. To sum it up: Although there is no real alternative to Latex, and I will therefore continue to use it in the future: IT SUCKS!

Consider the following problem:
I want no pagenumbers on all pages from the first, until after the list-of-tables.
If Latex would be sensibly designed, somthing like the following would work:

\pagestyle{empty}
\maketitle
\tableofcontents 
\listoffigures 
\listoftables
\pagestyle{headings}

But it doesn't! Some pages still have pagenumbers! This is what is necessary to remove ALL pagenumbers.
\usepackage{scrpage2}
[...]
\clearpage
\pagestyle{empty}
\renewcommand*{\chapterpagestyle}{empty}
\maketitle
\tableofcontents 
\listoffigures 
\listoftables
\addtocontents{toc}{\protect\thispagestyle{empty}}
\addtocontents{lof}{\protect\thispagestyle{empty}}
\addtocontents{lot}{\protect\thispagestyle{empty}}
\clearpage
\pagestyle{headings}
\renewcommand*{\chapterpagestyle}{plain} 


And then run latex several times ...
That is too much voodoo!


blog

Comments:



2011-02-11 10:47:35
Nokia and Microsoft: "There are other mobile ecosystems. We will disrupt them."

Time to say goodby to Nokia phones and "hello!" to android (and hope for Ubuntu on smartphones...)


blog

Comments:



2010-09-14 20:34:26
The next version of Ubuntu is coming soon
blog

Comments:



2010-04-07 20:58:06

blog

Comments:



2010-02-15 14:09:18

Today Nokia and Intel announced the merging of maemo and moblin to form MeeGo (TM).
While this might sound good to some, it is a bit sad for me. The first thing I'm sad of is the focus on C++ and Qt. As you might know, maemo 5, the operating system of the N900, is based on gtk and clutter.
the meego software stack
Quote:

GTK and Clutter are also included for application compatibility.
To me this sounds like: will be dropped in the next version.


I want Debian Mobile

But the biggest loss in this merge is the packet management system, which will be rpm.
Quote:

Will MeeGo use .rpm or .deb as its packaging system?
MeeGo will use the .rpm format
So: today I lost the urge to learn to develop software for my N900...


Update 2010-02-16: Here is a speed comparison of Yum (rpm management system) and probably Synaptic (deb management system). Although this is NOT a comparison between deb and rpm, is still says something about available tools in each package management system.
blog

Comments:



2010-02-03 20:45:10
And this is the first post from my new smartphone/internettablet...
blog

Comments:



2010-01-06 09:45:04
The trimaran Ady Gil of the Sea Shepherd Conservation Society, formerly known as Earthrace, has been rammed by the Japanese whaler ship Shonan Maru No. 2.

blog SeaShepherd AdyGil

Comments:



I have had some trouble to figure out how to use a class as a decorator for a method (as opposed to a decorator for a function). Here is a script that prints some useful information about what is called when and with what parameters.

#!/usr/bin/env python
print "Classes as Decorators of Methods\n"
print "-----Parsing dec"
class dec(object):
    def __init__(self, a):
        print "----- dec init"
        print type(a)
        print "decorated method: ", a.__name__
        self.a = a
    def __get__(self, inst, cls):
        print "-----dec get"
        self._inst = inst
        self._cls = cls
        return self
    def __call__(self, p):
        print "-----dec call"
        print type(self)
        print type(self._inst)
        print type(self._cls)
        return self.a(self._inst, p.upper())

print "-----Parsing C"
class C(object):
    def __init__(self):
        self.X = "Hello"
    @dec
    def run(self, p):
        print p,
        print self.X,
        return "world"

if __name__ == "__main__":
    print "-----Object creation"
    c = C()
    print "-----Object method call"
    print c.run("This is a decorator ")

This produces the following output:
Classes as Decorators of Methods

-----Parsing dec
-----Parsing C
----- dec init
type 'function'
decorated method: run
-----Object creation
-----Object method call
-----dec get
-----dec call
class '__main__.dec'
class '__main__.C'
type 'type'
THIS IS A DECORATOR Hello world


In contrast: functions as decorators for functions

#!/usr/bin/env python

print "--- Parsing dec"
def dec(f):
    print "--- Run dec"
    print f.__defaults__
    def x(*args, **kwargs):
        print "--- Run x"
        print f.__name__
        print args
        print kwargs
        f(*args, **kwargs)
    return x

print "--- Parsing foo"
@dec
def foo(a, b=3):
    print "--- Run foo"
    print a, b


print "--- Calling foo"
foo(1)
print "--- Calling foo"
foo(2, 4)
Which outputs:
--- Parsing dec
--- Parsing foo
--- Run dec
(3,)
--- Calling foo
--- Run x
foo
(1,)
{}
--- Run foo
1 3
--- Calling foo
--- Run x
foo
(2, 4)
{}
--- Run foo
2 4


blog python decorators

Comments:



2009-12-09 10:07:02
The sun by xkcd: XKCD the sun comic.
And the actual movie...
Sunshine
blog

Comments:



Read this, if you think that using ROOT and C++ for scientific analysis is a good idea!
If you start with scientific data analysis or if you are looking for a framework to build the software of your next-generation experiment: scipy/numpy seems like a good idea!
But please don't use ROOT. Please...
blog astro programming

Comments:



2009-08-23 20:29:19

Today I realized that the django way of internationalization is not as good as I had thought. Here are two areas where it could be improved:

The models

Django has no default way of translating fields in models. This is a known shortcoming and was addressed in many plugins (transdb, transmeta, multilingual, multilingual-model, translate, ...) and in a Google Summer of Code project by Marc Garcia.
As I see it, the translation of any kind of data should not be in a seperate table or in a metaclass. Why? Because translation should not be the way to think in the first place. If you have a piece of information that is not universally understandable (like an photograph), than you can assign a language or culture to that information. If your site should be available in several languages, then there is no good reason why one language should be superior (and allowed in the model), while other languages are inferior (and have to go into a translation table). So there is no translation of a first, superior string but there is a piece of information in different, equally important languages.
So, with regard to this poll, the only good option would be to state "this field is language specific" and django should create a field for every supported language (mainly like multilingual-model).
The admin interface should display these fields and a bonus would be to be able to create a report based on the missing translation fields.

The urls

But there are other fields where internationalization is also important and where I couldn't find any plugins or snippets. It's the url resolution. Your apps should have human-readable urls that don't change over time. Suppose you have this url in your shop: "/smartphone/linux/N900" and suppose that "smartphone" is a category that was not planned when the shop was planned but rather entered in the admin as a (translatable) categorization of a specific phone. Now if you want to make this translatable, you have to create a pattern like
"(?P.+)/(?P.+)/(?P.+)"
but how is that supposed to be distinguished from
"(?P.+)/(?P.+)/(?P.+)"
if these things should also be translatable? So the point is: the regular expressions in the url resolution mechanism are not translatable (if the strings are dynamical db content).

What could be done?

The could be an url manager that can receive signals about a change in the urls patterns. And there should be an attribute (db-field, function, ...) in every model or view which can take translatable fields as parameters and create and update the corresponding urlpatterns.


blog

Comments:

Angelia27REESE wrote: Various people all over the world receive the <a href="http://goodfinance-blog.com/topics/credit-loans">credit loans</a> in various banks, just because it is simple and comfortable.




2009-08-19 11:27:08

blog

Comments:



2009-06-08 20:18:11

If you work in Astronomy, you will likely have a lot of fits files lying around. Although the FITS format is absolutely not an image-only format, I would still like to see a preview in my filemanager if there is an image encoded in the file. The standard thumbnailers for Xubuntu don't do this, so here is how to create your own:

  1. create a desktop file that describes, what your thumbnailer does:

/usr/share/thumbnailers/fits-thumbnailer.desktop

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Type=X-Thumbnailer
Name=FITS Thumbnailer
MimeType=image/x-fits;image/fits;application/fits;
X-Thumbnailer-Exec=python /usr/lib/thunar-thumbnailers/fits-thumbnailer.py %i %o %s
  1. create the thumbnailer script under:

/usr/lib/thunar-thumbnailers/fits-thumbnailer.py

#!/usr/bin/env python
import pyfits
import matplotlib.pyplot as plt
import sys
try:
    infile  = sys.argv[1]
    outfile = sys.argv[2]
except:
    exit(1)
try:
    size = sys.argv[3]
except:
    size = 256
hdul = pyfits.open(infile)
data = None
# Is the primary HeaderDataUnit an image with data?
if (hdul[0].header["NAXIS"] != 0):
    data = hdul[0].data
else:
    # The primary had no data, so we search for the first image!
    for hdu in hdul[1:]:
        if (hdu.header["XTENSION"] == "IMAGE"):
            data = hdu.data
            break
if data != None:
    plt.imshow(data)
    plt.savefig(outfile, transparent=False, format="png")
  1. regenerate the thumbnailer cache:
/usr/lib/thunar/thunar-vfs-update-thumbnailers-cache-1
See it in action:
http://xubuntix.org/media/images/blog/thunar-screenshot.png

There are actually a lot of cases, where this will not work, it will not take WCS into account and is in general not very sophisticated, but it works for me (TM). For more information about Thunar thumbnailers see:

Customizing Thunar

Additional thunar thumbnailers

Freedesktop thumbnailer spezification

Freedesktop desktop-entry spezification


blog astro fits python

Comments:

term papers online wrote: There're no doubts that to buy term paper services of the highest quality at expert custom papers writing company is good decision for college students who don't ideas how to start their essays.




Yesterday I got my new Eee PC 901 go with 16GB ssd harddrive and Linux. The battery lifetime is great, the hardware in general is really nice.
But the software really really sucks. I have no idea why Asus is doing this (actually, I have an idea).
Ok, so what is the problem with that software thing on the Eee PC?
The first impression is that they tried their best to make it look like XP. This IS annoying. With all the innovation that they could have made, they chose to imitate the one system that Linux users don't want to see. The second impression is that the software I want is not there, that updates are missing (2009/06 and still Firefox 2.0 ????) and that the only configuration Asus wants you to do is changing the background color. One thing to note is that the screen is really small and a small window theme (icewm is used along with kde and gnome applications) would be good. Instead a big theme is used along with a big cursor and big fonts. There are signs of a full desktop mode (a start script, tutorials on the internet), but the Asus homepage states very clearly: Only one desktop mode is available.
So I guess that I will investigate further, if eeebuntu isn't much better. And the next time I will try to buy at system76 , if they start to delver to Germany ...
blog netbook asus software

Comments:



2009-05-19 10:33:04

In a Latex figure environment, the label command has to follow the caption command. Otherwise referencing the figure will result in the section number (where the figure appeared) to be printed. Sometimes Latex is not very user friendly...

\begin{figure}[!th]
\centering
\includegraphics[width=2.5in]{some_filename}
\caption{some caption}
\label{fig:some_image}
\end{figure}

blog

Comments:



2009-05-08 15:36:17
I have solved the puzzle
blog

Comments:

writing jobs wrote: This is surely nice that you are sharing the topic just about this post, therefore, I propose to use the assistance at the writer job service.




2009-04-11 11:51:42

Update 2009-11-13: more notes on the greek input

I use the AUCTex mode in Emacs, which has lots of useful features. Here is a mix of commands and additions that help me improve the Emacs-Latex experience: RefTex (actually you will already use this if you use AUCTex mode), Greek Emacs input, PDFSync and Orgmode tables.

RefTex

There is much to say about reftex. But I'll just show the two commands that I use regularly:

C-c =

This will open a buffer where you can navigate through your document's toc.

toc

This comes very handy for large projects like PhD thesis :-). With python I use something like outline mode for roughly the same purpose, but this is perfect for my latex documents.

The other shortcut I use is:

C-c [

This command will ask you for your citation style

citation style

and for a regulare expression for searching your bibtex file to find the reference.

bibtex file

Then you can navigate through the matching references and choose the one that you want.

find reference

With a single bibtex file containing about 1000 references (managed with referencer) this feature is very handy.

Xelatex for greek input

If you are using texlive / xetex, then you have full utf-8 support built-in. Now you need a way to use it :-) If you write in a language other then english, you probably already use this feature.

Just typing

äöüß

instead of

\"a\"o\"u\ss{}

is already good. But being able to also type:

$αβγ = 3μm$

instead of

$\alpha\beta\gamma = 3\mum$

is really a good thing, both for readability and for typing speed.

Update: actually it's not that simple. But it got simpler with TexLive 2009. I have something like this in the preamble of my documents:

\usepackage{mathspec}
\setmainfont[Mapping=tex-text]{CMU Serif}
\setsansfont[Mapping=tex-text]{CMU Sans Serif}
\setmathsfont(Greek,Latin){CMU Serif}
\setmathsfont(Digits){Neo Euler}

To insert greek characters in emacs, just type:

C-\ greek RET

From then on, the

C-\

will switch between greek input and your normal input.

PDFSync

Sometimes in larger documents, you want to jump directly from a line in your latex file to the corresponding line in the pdf file. With pdfsync and xpdf, this is possible (note that with TexShop the other way is also possible, but not with emacs at the moment).

In you Latex file, insert the following:

\usepackage{pdfsync}

Now just type:

C-c C-v

and the line will be displayed in xpdf. Nice.

OrgMode Tables

The Emacs Org mode is a great mode for table editing (and other things). The table editing mode can be called separate from the complete Org mode, which is a great tool for example for Latex, where the table editing is something very unpleasant! The following work flow helps a lot, but check out the full example here for more advanced options: OrgMode Manual

Let's start with a Latex file with the comment package (the org mode table is within a comment environment, so your latex does not get messed up!):

\documentclass{article}
\usepackage{comment}
\begin{document}
Hallo!\\
\end{document}

Then type:

M-x orgtbl-mode
M-x orgtbl-insert-radio-table

This will ask you for a table name, let's say: atesttable

Now the document looks like this:

\documentclass{article}
\usepackage{comment}
\begin{document}
Hallo!\\
% BEGIN RECEIVE ORGTBL atesttable
% END RECEIVE ORGTBL atesttable
\begin{comment}
#+ORGTBL: SEND atesttable orgtbl-to-latex :splice nil :skip 0
| | |
\end{comment}
\end{document}

And then you can change the table using the great OrgMode capabilities! Once you have done this, type

C-c C-c

This will update the latex table to something like this:

\documentclass{article}
\usepackage{comment}
\begin{document}
Hallo!\\
% BEGIN RECEIVE ORGTBL atesttable
\begin{tabular}{rll}
Times [sec] & Names & something else \\
\hline
3 & John & hi \\
4 & Elisa & ho \\
5 & Nobody & hiho \\
 &  &  \\
\end{tabular}
% END RECEIVE ORGTBL atesttable
\begin{comment}
#+ORGTBL: SEND atesttable orgtbl-to-latex :splice nil :skip 0
| Times [sec] | Names  | something else |
|-------------+--------+----------------|
|           3 | John   | hi             |
|           4 | Elisa  | ho             |
|           5 | Nobody | hiho           |
|             |        |                |
\end{comment}
\end{document}

blog emacs latex

Comments:

Bomentepe wrote: <a href=http://www.realcazinoz.com/riverbellecasino.htm>online casino</a>


mimiWrifetE wrote: <a href=http://www.onlinepokiesonline.com>free casino bonus</a> <a href=http://www.casinovisa.com/blackjack/>blackjack</a> , <a href=http://www.concordiaresearch.com/games/craps/index.html>roulette</a> , <a href=http://www.realcazinoz.com/bingo>paypal casino</a> , <a href=http://www.avi.vg/category.php?a=sex4sexx&cid=36>dongs</a>


Bomentepe wrote: <a href=http://www.casinoonlinebrazil.com/jogos-de-cassino>online blackjack</a> <a href=http://www.realcazinoz.com/mansion-casino.htm>casino mansion</a> <a href=http://www.realcazinoz.com/de/jackpotcity-casino-gratis.htm>jackpotcity</a> <a href=http://www.planet23.com/winner-bonus-code>winner casino</a> <a href=http://www.realcazinoz.com/swiss-casino.htm>casino swiss</a>




2009-04-09 08:17:06
Countdown to Xubuntu (xubuntu.org) 9.04, by Pasi Lallinaho
blog xubuntu

Comments:



2009-04-03 15:11:33
Why do I even try to used it again and again?
OpenOffice 3 crashed for the third time today. I really should have made that presentation with Latex-Beamer!
Oh and by the way: If I write μController I don't mean Mcontroller, AutoCorrect seems to think different...
blog openoffice ui presentation

Comments:



2009-03-27 07:52:58

blog

Comments:



2009-03-11 08:42:36
Today I found one thing that I like about git:
You can distinguish between the committer and the author of a commit. Nice.
blog git ui

Comments:



2009-03-03 12:41:01

Given that a and b are positive, the calculation:

a*b
and
exp(log(a)+log(b))
are mathematically the same.


But is this true in computer languages?

a:1.2345678e-30
b:5.5889944e-28
The real result is: 6.89999252062032 e-58
What do the following programs tell me?

C

#include <math.h>
#include <stdio.h>

int main(){
  double a = 1.2345678e-30;
  double b = 5.5889944e-28;
  double c, d;

  c = a * b;
  d = exp(log(a)+log(b));

  printf("a * b =                %.20e \n", c);
  printf("exp(log(a) + log(b)) = %.20e \n", d);
  return 0;
};

output:
a * b = 6.89999252062031977189e-58
exp(log(a) + log(b)) = 6.89999252062023345995e-58
The real result is: 6.89999252062032


Python

import math
a = 1.2345678e-30
b = 5.5889944e-28
print "----------math----------"
print "a * b =                %s" % repr(a*b)
print "exp(log(a) + log(b)) = %s" % repr(math.exp(math.log(a)+math.log(b)))



import mpmath
mpmath.mp.dps = 20
a = mpmath.mpf(1.2345678e-30)
b = mpmath.mpf(5.5889944e-28)
print "---------mpmath---------"
print "a * b =                %s" % repr(a*b)
print "exp(log(a) + log(b)) = %s" % repr(mpmath.exp(mpmath.log(a)+mpmath.log(b)))
output:
----------math----------
a * b = 6.8999925206203198e-58
exp(log(a) + log(b)) = 6.8999925206202335e-58
---------mpmath---------
a * b = mpf('6.8999925206203201922352e-58')
exp(log(a) + log(b)) = mpf('6.8999925206203201919869e-58')
The real result is: 6.89999252062032


Scheme

(define x 0.0000000000000000000000000000012345678)
(define y 0.00000000000000000000000000055889944)
(* x y)
(exp (+ (log x) (log y)))

output:
6.89999252062032e-58
6.899992520620233e-58


R

c = 1.2345678e-30 * 5.5889944e-28 print(c, digits=20) d = exp(log(1.2345678e-30) + log(5.5889944e-28)) print(d, digits=20)
output:
6.89999252062032e-58
6.899992520620233e-58
the real result is 6.89999252062032 e-58

gcalctool

Not exactly a language, but interesting: the result is 6.89999252062032e-58 for a*b.
Note, that the standard windows calculator also prints the exact result.

So what is the result:

Language Results
c: 6.89999252062031977189 e-58
6.89999252062023345995 e-58
python (math): 6.8999925206203198 e-58
6.8999925206202335 e-58
python (mpmath): 6.8999925206203201922352 e-58
6.8999925206203201919869 e-58
scheme: 6.89999252062032 e-58
6.899992520620233 e-58
R 6.89999252062032e-58
6.899992520620233e-58
gcalculator and windows calculator: 6.89999252062032 e-58
the real result: 6.89999252062032 e-58

Given these numbers of a and b, a*b is more precise (most of the time).
blog

Comments:



2009-02-27 13:55:05
You might have read it already, but today the Xfce team released Xfce 4.6!
Congratulation to the developers.
Take a look at the new features here: Tour

blog xfce

Comments:

high voltage cable testing wrote: I’m so glad that ordered high voltage cable testing of capacitors as this helped me to determine that there were the errors with their placing.




2009-02-24 12:59:38
I use these packages regularly:

blog python astro

Comments:

online essays wrote: If you want to build brilliant career, you will be able to buy custom writing at certified service.




My Problem:

I have a lot of unsorted scientific papers! Their filenames don't resemble their titles and they are stored in a bunch of places. I tend to download them as I search the internet for papers that help me with a problem and sometimes I even DownThemAll.
Weeks, month later, I try to find the *one paper* that was so interesting and cite it via BibTex in my Latex file. But I can't remember the filename, title, author, year or journal (in any combination).
Or I see a paper, know that I read it, but can't remember if it was that good...

Possible Solution:

Using a search engine (Tracker), a bibliography manager (Referencer) and a file manager (Thunar).
With Thunar, I can mark files as interesting.
With Tracker I can search the text of a document and tag it.
With Referencer I can tag a paper and export the meta-information to a Bibtex file.

Why I'm still unhappy:

It seems that Tracker, Referencer and Thunar don't use the same location to store meta-information about the documents. They all seem to use different databases. I would have to write a plugin for two of them to get the three of them working together.
Not good.


blog pdf meta-information

Comments:

essays online wrote: It can be very comfortable to purchase course works from homes at the essay service. However, that is essential to hire professional paper writers.




2009-01-31 13:17:56

Numdisplay is one of the cool python astronomy packages that lack documentation! What I want to do is display an image from the python shell (easy and well documented) and this image shall contain WCS information, because otherwise I could as well use matplotlib (really hard and NOT documented).

What I know so far:
  • open ds9 with the following command: "ds9 -unix "/tmp/.IMT3"
  • in the python shell create an UnixImageDisplay "uid = numdisplay.displaydev.UnixImageDisplay("/tmp/.IMT3")"
  • don't really know how to continue ... the wcs stuff seems not to work the way I expect ...
Next try, this time with python-sao :
  • import pysao
  • ds9 = pysao.ds9()
  • ds9.view(hdul[6])

Much better :-)


blog astro python ds9

Comments:

buy essays wrote: If you think that to buy custom essay supposes to be bad, then you can be wrong! The writing corporations used to be invented to aid guys and that is not a crime if you look for a help!


buy essays uk wrote: The the greatest problem of academic papers writing market. Qulified uk papers service should get you assurance that its papers are non-plagiarized.


weddingcall wrote: <a href="http://www.dressmall.co.uk/sale-plus-size-wedding-dresses-46.html">Plus Size Wedding Dresses</a> <a href="http://www.dressmall.co.uk/sale-prom-dresses-2011-14.html">Prom Dresses 2011</a> <a href="http://www.dressmall.co.uk/sale-short-bridesmaid-dresses-42.html">Short Bridesmaid Dresses</a> <a href="http://www.dressmall.co.uk/sale-short-prom-dresses-19.html">Short Prom Dresses</a> <a href="http://www.dressmall.co.uk/sale-short-wedding-dresses-48.html">Short Wedding Dresses</a> <a href="http://www.dressmall.co.uk/sale-simple-wedding-dresses-49.html">Simple Wedding Dresses</a> <a href="http://www.dressmall.co.uk/sale-strapless-bridesmaid-dresses-43.html">Strapless Bridesmaid Dresses</a> <a href="http://www.dressmall.co.uk/sale-wedding-dresses-2011-52.html">Wedding Dresses 2011</a> <a href="http://www.dressmall.co.uk/sale-white-ivory-prom-dresses-38.html">White &amp; Ivory Prom Dresses</a> <a href="http://www.dressmall.co.uk/sale-low-vneck-dresses-22.html">Low V-Neck Dresses</a> <a href="http://www.dressmall.co.uk/sale-plus-size-prom-dresses-21.html">Plus Size Prom Dresses</a>




2009-01-11 13:58:41
My django projects that form this site are not finished. I change them every now and then. This includes the underlying data models.
One thing you have to know when you do this, is that django's "manage.py syncdb" does not update already existing database tables. That is up to you! If you're like me use the sqlite3 database that is included in Python2.5, then you might also be interested in this project: sqlitebrowser.
At least I don't care enough about sql to really learn it, and then a gui like this comes very handy.
blog django sqlite

Comments:



2009-01-08 15:29:04
Update: the solution is here: Kapteyn
Update 2: there is also a new package that I have not tested, but that seems to be good: APLpy
Update 3: and now there is also: pywcsgrid2

You might want to look at the following site for more up to date information: astropython

Python is a good language for scientists. It basically replaces proprietary software like IDL, Matlab or SAS. What it lacks at the moment is an easy way to display astronomical data saved as fits files containing WCS information.
WCS information standardizes the transformation between pixel coordinates and world coordinates (e.g. position in the sky). There is a good library, pywcs, that deals with this information. Matplotlib, a good choice for plotting data with python, includes Basemap, a toolkit to display maps (of the earth) in various projections. What is missing is a link between these two!


What kinds of projections are supplied by basemap and wcs?
Basemap name FITS Code WCS Names
AZP Zenithal perspective
SZP Slant zenithal perspective
Gnomonic ProjectionTANGnomonic
Stereographic ProjectionSTGStereographic
SIN Slant orthographic
ARC Zenithal equidistant
ZPN Zenithal polynomial
Lambert Azimuthal Equal Area Projection ZEA Zenithal equal area
AIR Airy
CYP Cylindrical perspective
CEA Cylindrical equal area
Cassini Projection CAR transverse case
CAR Plate carree
Miller Cylindrical Projection CAR with unequal scaling
Mercator Projection MER Mercator
Transverse Mercator Projection MER transverse case
Oblique Mercator Projection
Equidistant Cylindrical Projection
Sinusoidal Projection SFL Sanson-Flamsteed
PAR Parabolic
Mollweide Projection MOL Mollweide
AIT Hammer-Aitoff
COP Conic perspective
Albers Equal Area Projection COE Conic equal-area
Equidistant Conic Projection COD Conic equidistant
COO Comic orthomorphic
Lambert Conformal Projection for sperical earth = COO
BON Bonne's equal area
Polyconic Projection PCO Polyconic
TSC Tangential Sperical Cube
CSC COBE Quadrilateralized Spherical Cube
QSC Quadrilateralized Spherical Cube
Azimuthal Equidistant Projection
Orthographic Projection
Geostationary Projection
Robinson Projection
Gall Stereographic Projection
Polar Stereographic Projection
Polar Lambert Azimuthal Projection
Polar Azimuthal Equidistant Projection
McBryde-Thomas Flat Polar Quartic
van der Grinten Projection

blog astronomy python fits wcs

Comments:

aremo wrote: abine Ziler




2009-01-08 14:53:51
I wanted to switch from blogger to my own blogging software.
The main reason for this was that I wanted to do more with django and building my own blogging solution seemed to be a good start. I looked into pinax blog app and copied most part from there... And it seems to work!
What is missing:
  • comments
  • a cool admin interface (is it possible to include an emacs-nox into a django admin interface? that would be interesting...)
  • file upload with automatic reference from within the blog post. Something like "attachment[1]"

blog django pinax emacs

Comments:

Stefan wrote: This is a test comment.


Jaiskefesip wrote: The talk within the finest used cellular phone for sale is built to be even any more fiercely asserted amidst consumers. There are lots of brands from which to decide with a lot of models. Then you need capabilities to walk off into account, and also battery. In the motive you be required to choice the one that’s kind for you, and also period’s your own private meet with of style. The fashionable best three hottest employed cellular phones at one's disposal would be the BlackBerry Bead, Your Apple IPhone, as luckily as the Motorola talkabout Blade. All three or more of such are imaginary candidates and each has their acutely own durability as highly as fragile spots. We will look at each one of these mutatis mutandis so that you can decide for yourself which of such you believe ordain be best. <a href=http://www.usedcellphonesforsales.info/>Used cellphones for sale</a>


custom thesis wrote: That column is really valuable! One day, article writing company facilitate me with writing an essay, which I was unable to terminate due to private causes. I consult you thesis writing that will assist you in your university life. Cheer!


alawarigr wrote: <a href=http://alawar-igri.ru/>Игры Alawar</a> В свою очередь мы подготовились к вашему приходу, собрав безотлучно самые лучшие зрелище alawar на нашем ресурсе. И наша заслуга по наполнению базы игр вовсе незакончена, она продолжается постоянно, благодаря чему выше сайт педантичный дополняется новинками, которые выпускает сооружение игр alawar.


ponsigarusi wrote: <a href=http://cybercrime-956631.ru/uniseks-sigarety/tyazhelye-sigarety.html>тяжелые сигареты</a> <a href=http://cybercrime-956631.ru/2008/kupit-elektronnye-sigarety-v-sviyazhske.html>купить электронные сигареты в свияжске</a> <a href=http://cybercrime-956631.ru/aksessuary/elektronnaya-sigareta-v-tverdoi-pachke-s-usb-zaryadkoi-dream.html>электронная сигарета в твердой пачке с usb зарядкой dream</a> <a href=http://cybercrime-956631.ru/nash-forum/kupit-elektronnye-sigarety-v-petrove-dalnem.html>купить электронные сигареты в петрове дальнем</a> <a href=http://cybercrime-956631.ru/aksessuary/kupit-elektronnye-sigarety-v-goryachevodskom.html>купить электронные сигареты в горячеводском</a> www nicotek ru золотой вавилон электронная сигарета электронная сигарета в верхней салде купить электронные сигареты в новотитароской электронная сигарета плюсы и минусы


Liposhock wrote: fnzfryvcvoujy, <a href="http://hcgproductsreview.com/liposhock-review">Liposhock</a>, SLNzhdP, [url=http://hcgproductsreview.com/liposhock-review]Liposhock[/url], bMfYGYY, http://hcgproductsreview.com/liposhock-review liposhock, FIqlwuY.




copied from my old blog
I'm going to post things that need to be done in GNU/Linux whenever I find them.
Today: PDF Annotation!
The PDF specification includes annotations, with position, color, text, highlighting, whatever.
This is a really useful feature, because I think that PDFs are an excellent way to share documents with other people, who are often supposed to make some corrections on that document (and no one wants to share whole latex directories...). So if you work in a Microsoft environment, you are allowed to buy Adobe Acrobat. If you work on Mac OSX, you can use "preview" to annotate PDFs (in a very intuitive way). But if you work on GNU/Linux there are no good programs to do that.
Sure, there are a lot of programs, that you can use to do something very close to that, but thats not enough!
  1. PDFedit: the interface sucks. There is no back/undo button. There is no way to highlight just a word, strike through just a word. Make a box and add some text outside the page borders. AND I DONT NEED 10 colors for my pencil. 3 colors would be more then enough!
  2. OpenOffice 3: The fonts are broken. Every time. If I can't read the PDF, I can't annotate it. And others won't be able to read my annotations. (And I don't even know, if annotations would be possible in OpenOffice...
  3. Inkscape: Fonts are broken too. Only one page open at a time. NO WAY.
  4. Xournal: Close, but ... A simple box to write some text would be cool. Text highlighting as well. I know that it's not possible if the page is only loaded as an image, but that's what I would need.
  5. Evince: well, there will be Annotation support at some time in the future, ... (hopefully).

  6. blog p4 project presentation-software pdf ui

    Comments:

    resume writing services wrote: The clients count on our resume service cause they are very reliable! Our organization represents resume writer to fit the precise field of study you prefer.




2007-07-19 15:33:52
copied from my old blog Today I "discovered" Meld. I'm not sure if Meld is just an interface to diff, bzr, CVS, mercurial, ... or if it has a selfmade diff-engine. But the keypoint is that is has a really cool interface.
Here are some screenshots:

And after scrolling a bit down:

Wow. That's how I like a visual diff to appear. Both files are scrolled simultaniously, but in a way that takes care of the different file sizes. So you can always see the corresponding lines side by side.
And yes the arrows are for melding the differences from one file to the other.
This is really a tool that adds some value by using a good graphical interface.
blog meld bzr ui

Comments:

dance essays paper wrote: Generally I complete my research paper in the car. However, it's not really possible to do the same with history essays. Such kind of work I send to the custom writing corporations.



Created with: Django, Python, Emacs, Xubuntu, blueprintcss, Inkscape, Apache2