[AstroPy] Help with python image processing problem

Peter Berrett p.berrett at optusnet.com.au
Wed May 15 07:47:22 EDT 2013


1st problem 

It requires me to import MOPfits

Where can I get MOPfits and can I get it for Python 2.7  in Windows?

cheers Peter



From: Peter Berrett 
Sent: Wednesday, May 15, 2013 9:36 PM
To: astropy at scipy.org 
Subject: Re: [AstroPy] Help with python image processing problem


Thanks

I shall give it a try and see if it works

cheers Peter



From: JJ Kavelaars 
Sent: Tuesday, May 14, 2013 11:48 PM
To: Peter Berrett 
Cc: <astropy at scipy.org> 
Subject: Re: [AstroPy] Help with python image processing problem


This script:


<https://github.com/ijiraq/MOP/blob/master/src/jjk/preproc/preproc.py>


will do what you want with some modification.  This was written for CFHT MegaPrime images but would generally work on FITS.  The result is in 'FITS' at the end so you'll need to use a scaling/convert program to get them into jpg or load them into a browser as FITS (maybe using js9 if you are doing this via a web interface). 


That script is not documented very much.  --help provides some details and you need a bunch of other packages to get to going.


preproc.py --normal --combine --outfile=flat input1.fits input2.fits input3.fits ....


will build a 'flat' based those input images.


preproc.py --flat=flat.fits --outfile=image1_p.fits image1.fits  


will provide image1_p.fits flattened by flat.fits


There is some specific logic in the script to deal with file names when MEGAPIPE data is provided.  and the overscan/bias methods will only work on those data.  But you are free to use this as a starting point.

JJ

On 2013-05-14, at 8:52 AM, "Peter Berrett" <p.berrett at optusnet.com.au> wrote:


  Hi all

  I am new to this list and was hoping someone could help me with a programming problem.

  I am writing a program in python to find sungrazer comets in soho telsescope c2 images. Normally they are pretty easy to find just by looking at processed images but finding these comets is pretty competitive to the point where comet-hunters now download raw images from the lasco archives in FITS format and process them themselves in order to gain minutes, and sometimes seconds advantage.

  So if I am going to compete effectively I will need some software to do the same.

  The images 1024 x 1024 are stored in .fts format on a server I can access. What I need is a python script to make a masterflat from the batch of available images and then another to subtract the masterflat from the image being processed. Would anyone have some python scripts that have already been prepared and can do this? I have looked at various image handling libraries to do this but they either lack documentation or are a bit difficult to work with for fits files.

  I'd be grateful for any help anyone can provide.

  Sample images can be seen at 

  ftp://lasco6.nascom.asa.gov/asco/lastiage/level_05/130514/c2/
     

  Basically I want to process these images and be able to turn them into processed gif or bmp files within a few seconds after a new file is added to the directory.

  Thanking you

  Peter Berrett





  _______________________________________________
  AstroPy mailing list
  AstroPy at scipy.org
  http://mail.scipy.org/mailman/listinfo/astropy



--------------------------------------------------------------------------------


_______________________________________________
AstroPy mailing list
AstroPy at scipy.org
http://mail.scipy.org/mailman/listinfo/astropy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20130515/83ec759b/attachment.html>


More information about the AstroPy mailing list