Quantcast

How do I find the apparent magnitude of a galaxy from a FITS file?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

How do I find the apparent magnitude of a galaxy from a FITS file?

RU4real
Greetings!
I am still new to R but have been asked to look at doing astronomy with R.
I have a FITS file which contains an optical telescope image (it can be viewed in SAOimageDS9).
I need to estimate the magnitude of a galaxy... and eventually other optical sources.

How do I find the apparent magnitude of a galaxy from a FITS file?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How do I find the apparent magnitude of a galaxy from a FITS file?

Rui Barradas
Hello,

A search using sos::findFn('fits') returned package FITSio as number three.
It would enable you to read FITS files. As for the question, how do you
do what you want to do, I don't know.

Hope this helps,

Rui Barradas

Em 10-08-2012 15:50, andrej escreveu:

> Greetings!
> I am still new to R but have been asked to look at doing astronomy with R.
> I have a FITS file which contains an optical telescope image (it can be
> viewed in SAOimageDS9).
> I need to estimate the magnitude of a galaxy... and eventually other optical
> sources.
>
> How do I find the apparent magnitude of a galaxy from a FITS file?
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/How-do-I-find-the-apparent-magnitude-of-a-galaxy-from-a-FITS-file-tp4639907.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How do I find the apparent magnitude of a galaxy from a FITS file?

RU4real
I put "sos::findFn('fits')" into the search engine and it returned 0 results, so how are you finding this?

Also: Why was my mailing list message rejected as a duplicate? I don't even understand how these underground subscriptions work, am I off the mailing list because it's a duplicate?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How do I find the apparent magnitude of a galaxy from a FITS file?

David Winsemius

On Aug 10, 2012, at 4:06 PM, andrej wrote:

> I put "sos::findFn('fits')" into the search engine and it returned 0  
> results,
> so how are you finding this?

'sos' is an R package. I'm guessing you did not install and load 'sos'  
before typing that command at the console.  (You might be able to get  
away without loading by using the double-colon maneuver.) That was not  
a particularly well crafted search strategy IMO,  given the number of  
times that the word 'fit' or 'fits' will appear in statistical  
documentation.

sos::findFn('fits')
found 2482 matches;  retrieving 20 pages, 400 matches.
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Nonetheless, it "worked". The browser page coming up from that search  
had the package FITSio 25th line.

Better might have been:

 > sos::findFn('fits astronomical')
found 4 matches;  retrieving 1 page

> Also: Why was my mailing list message rejected as a duplicate?

Because you posted two duplicate messages. One of them was forwarded  
to the list.

> I don't even understand how these underground subscriptions work, am  
> I off the mailing
> list because it's a duplicate?

No. You were just notified in hopes that you would stop sending  
duplicates. The list-server thinks you are a subscriber, but for some  
reason it will keep on sending posting from new subscribers to the  
moderation queue for the first 24 hours. That's not something that  
moderator have control over. Don't complain, we don't like it either.

I don't understand the term "underground subscriptions". Mailing lists  
can be public or private. Ours is rather public, having multiple  
mirrors and search engines around the world. Our host university's  
site-admins have installed fairly stringent filters in an effort to  
prevent their domain from being automatically flagged as a source of  
spam. Some domains like hotmail.com have a high probability of being  
flagged for moderator review. Some posters from hotmail are on  
perpetual review, despite being perfectly fine citizens.


> --
> View this message in context: http://r.789695.n4.nabble.com/How-do-I-find-the-apparent-magnitude-of-a-galaxy-from-a-FITS-file-tp4639907p4639996.html
> Sent from the R help mailing list archive at Nabble.com.

Nabble is not the r-help mailing list. You should read the Posting  
Guide and learn to include context with your replies. Nabble users are  
notorious for faling to heed that request.)

--

David Winsemius, MD
Alameda, CA, USA

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How do I find the apparent magnitude of a galaxy from a FITS file?

RU4real
[1] Oh, that kind of duplicate... I thought you meant duplicate in that someone else had already asked how to use R to analyze FITS images. Well every time I post, I get the "Mailing List Subscription Reminder." I suppose you want me to just click on "I'm already a subscriber" and just post here then.

[2] I obtained R (actually R64) from the following website:
http://cran.cnr.berkeley.edu/bin/macosx/

I guess it didn't come with an 'sos' package. I assume it's here:
http://cran.r-project.org/web/packages/sos/index.html

and when I download/expand the package, I get a bunch of files, but I didn't see anything in them or the sos.pdf manual that tells me where the files go.


[3] Anyway, does anyone know of how to do FITS magnitudes in R, or at least know of a community that uses R to look at and analyze FITS images?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How do I find the apparent magnitude of a galaxy from a FITS file?

Michael Weylandt


On Aug 11, 2012, at 6:34 AM, andrej <[hidden email]> wrote:

>
> [2] I obtained R (actually R64) from the following website:
> http://cran.cnr.berkeley.edu/bin/macosx/
>
> I guess it didn't come with an 'sos' package. I assume it's here:
> http://cran.r-project.org/web/packages/sos/index.html
>
> and when I download/expand the package, I get a bunch of files, but I didn't
> see anything in them or the sos.pdf manual that tells me where the files go.

Since you're on a Mac, it's much easier to simply type

install.packages("sos")

Inside R to install the package (which you only need to do once) and then

library(sos)

In each session you wish to use it to load the package


Michael

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How do I find the apparent magnitude of a galaxy from a FITS file?

David Carlson
In reply to this post by David Winsemius
Actually you could find it with RSiteSearch("FITS") which comes with base R
as the first hit:

1. R: Read a single data set from a FITS file (score: 51)
    Author: unknown
    Date: Wed, 22 Feb 2012 19:25:09 -0500
    Read a single data set from a FITS file Description Usage Arguments
Details Value Note Author(s) References See Also Examples page for readFITS
{FITSio} readFITS {FITSio} R Documentation Read a sing
http://finzi.psych.upenn.edu/R/library/FITSio/html/readFITS.html (8,088
bytes)

That leads you to FITSio, the package that you probably want to install and
learn how to use to read FITS files.

A little work with google leads to
http://fits.gsfc.nasa.gov/
http://en.wikipedia.org/wiki/FITS

It appears that FITS is an image and table format for storing astronomical
data so there is more than one kind of FITS file. You haven't told us what
kind of FITS file you are using or where it came from (although that
probably wouldn't help in this case since we answer questions about R not
astronomy). You probably need to re-visit the web site from which you
obtained the data and do a little research on your own (e.g.
http://www.sdss.org/dr7/).

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352





> -----Original Message-----
> From: [hidden email] [mailto:r-help-bounces@r-
> project.org] On Behalf Of David Winsemius
> Sent: Friday, August 10, 2012 8:36 PM
> To: andrej
> Cc: [hidden email]
> Subject: Re: [R] How do I find the apparent magnitude of a galaxy from
> a FITS file?
>
>
> On Aug 10, 2012, at 4:06 PM, andrej wrote:
>
> > I put "sos::findFn('fits')" into the search engine and it returned 0
> > results,
> > so how are you finding this?
>
> 'sos' is an R package. I'm guessing you did not install and load 'sos'
> before typing that command at the console.  (You might be able to get
> away without loading by using the double-colon maneuver.) That was not
> a particularly well crafted search strategy IMO,  given the number of
> times that the word 'fit' or 'fits' will appear in statistical
> documentation.
>
> sos::findFn('fits')
> found 2482 matches;  retrieving 20 pages, 400 matches.
> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
>
> Nonetheless, it "worked". The browser page coming up from that search
> had the package FITSio 25th line.
>
> Better might have been:
>
>  > sos::findFn('fits astronomical')
> found 4 matches;  retrieving 1 page
>
> > Also: Why was my mailing list message rejected as a duplicate?
>
> Because you posted two duplicate messages. One of them was forwarded
> to the list.
>
> > I don't even understand how these underground subscriptions work, am
> > I off the mailing
> > list because it's a duplicate?
>
> No. You were just notified in hopes that you would stop sending
> duplicates. The list-server thinks you are a subscriber, but for some
> reason it will keep on sending posting from new subscribers to the
> moderation queue for the first 24 hours. That's not something that
> moderator have control over. Don't complain, we don't like it either.
>
> I don't understand the term "underground subscriptions". Mailing lists
> can be public or private. Ours is rather public, having multiple
> mirrors and search engines around the world. Our host university's
> site-admins have installed fairly stringent filters in an effort to
> prevent their domain from being automatically flagged as a source of
> spam. Some domains like hotmail.com have a high probability of being
> flagged for moderator review. Some posters from hotmail are on
> perpetual review, despite being perfectly fine citizens.
>
>
> > --
> > View this message in context: http://r.789695.n4.nabble.com/How-do-I-
> find-the-apparent-magnitude-of-a-galaxy-from-a-FITS-file-
> tp4639907p4639996.html
> > Sent from the R help mailing list archive at Nabble.com.
>
> Nabble is not the r-help mailing list. You should read the Posting
> Guide and learn to include context with your replies. Nabble users are
> notorious for faling to heed that request.)
>
> --
>
> David Winsemius, MD
> Alameda, CA, USA
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How do I find the apparent magnitude of a galaxy from a FITS file?

RU4real
> > sos::findFn('fits astronomical')
>found 4 matches;  retrieving 1 page

Alright I installed SOS, but in the line below "found 4 matches;  retrieving 1 page" R spit out the following:

"Error in print.findFn(list(Count = 1, MaxScore = 1, TotalScore = 1, Package = "FITSio",  :
could not find function "brew""

I used FITSio before, so I know I can just install that... the point of me posting was to see if anyone here had actually used it to analyze the images. As I said before, this is an optical telescope image (which can be viewed in SAOimageDS9); let's just say that's from the HST.
Loading...