From pdzwig at summaventures.com Thu Feb 4 15:04:35 2021 From: pdzwig at summaventures.com (Peter Dzwig) Date: Thu, 4 Feb 2021 20:04:35 +0000 Subject: [AstroPy] YASQ - Yet Another SkyCoord Question Message-ID: <1ddc9f2a-d3bc-9bc5-bea9-217e277cce2d@summaventures.com> All, I have been attempting to get RA, Dec from SkyCoord via SkyCoord.from_name. It claims to be "unable to resolve" quite a few names. As a concrete example, LEDA 30866: SkyCoord.from_name(LEDA30866) oit goes to CDS at strasbourg and gives me back the message: "Unable to resolve", yet if I go directly to HyperLEDA (a) it is a recognised object (PGC030866); (b) it cross-identifies it and gives *three* SDSS names (plus others). If instead I put in one of the various SDSS names (I have tried all three) I get the same message. The obvious question: why can't it resolve the name? is it because it hasn't a way to choose between the choice names? Can someone clarify - and possibly offer a way to resolve this issue? So far I have encountered this issue in about 20% of my searches. Many thanks, Peter -- Dr. Peter Dzwig From adrianmpw at gmail.com Thu Feb 4 15:23:23 2021 From: adrianmpw at gmail.com (Adrian Price-Whelan) Date: Thu, 4 Feb 2021 15:23:23 -0500 Subject: [AstroPy] YASQ - Yet Another SkyCoord Question In-Reply-To: <1ddc9f2a-d3bc-9bc5-bea9-217e277cce2d@summaventures.com> References: <1ddc9f2a-d3bc-9bc5-bea9-217e277cce2d@summaventures.com> Message-ID: Hi Peter, It's possible that there are some intermittent issues with the Simbad database itself, or with your connection. I just tried and it worked for me: >>> coord.SkyCoord.from_name("LEDA30866") Did the error message return any additional information? It's possible we need to audit the error messages we raise to make sure they provide enough information for cases like this. best, Adrian On Thu, Feb 4, 2021 at 3:14 PM Peter Dzwig wrote: > All, > > I have been attempting to get RA, Dec from SkyCoord via > SkyCoord.from_name. It claims to be "unable to resolve" quite a few names. > > As a concrete example, LEDA 30866: > > SkyCoord.from_name(LEDA30866) > > oit goes to CDS at strasbourg and gives me back the message: "Unable to > resolve", yet if I go directly to HyperLEDA > > (a) it is a recognised object (PGC030866); > (b) it cross-identifies it and gives *three* SDSS names (plus others). > > If instead I put in one of the various SDSS names (I have tried all > three) I get the same message. > > The obvious question: why can't it resolve the name? is it because it > hasn't a way to choose between the choice names? > > Can someone clarify - and possibly offer a way to resolve this issue? > > So far I have encountered this issue in about 20% of my searches. > > > Many thanks, > > Peter > -- > > Dr. Peter Dzwig > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy > -- Adrian M. Price-Whelan Flatiron Institute, NYC http://adrn.github.io (he / him) -------------- next part -------------- An HTML attachment was scrubbed... URL: From derek at astro.physik.uni-goettingen.de Thu Feb 4 15:28:55 2021 From: derek at astro.physik.uni-goettingen.de (Derek Homeier) Date: Thu, 4 Feb 2021 21:28:55 +0100 Subject: [AstroPy] YASQ - Yet Another SkyCoord Question In-Reply-To: References: <1ddc9f2a-d3bc-9bc5-bea9-217e277cce2d@summaventures.com> Message-ID: On 4 Feb 2021, at 9:23 pm, Adrian Price-Whelan wrote: > > It's possible that there are some intermittent issues with the Simbad database itself, or with your connection. I just tried and it worked for me: > > >>> coord.SkyCoord.from_name("LEDA30866") > (157.255, 29.63472222)> > > Did the error message return any additional information? It's possible we need to audit the error messages we raise to make sure they provide enough information for cases like this. > Worked for me just as well. The LEDA server in Lyon has been down for some time, and came only back online a few days ago, I think. If it continues to fail for you, perhaps check your cache and proxy settings (though I agree a clearer error message would be helpful). Cheers, Derek From m.shemuni at gmail.com Fri Feb 5 05:32:44 2021 From: m.shemuni at gmail.com (Mohammad Shameoni Niaei) Date: Fri, 5 Feb 2021 13:32:44 +0300 Subject: [AstroPy] YASQ - Yet Another SkyCoord Question In-Reply-To: References: <1ddc9f2a-d3bc-9bc5-bea9-217e277cce2d@summaventures.com> Message-ID: If the problem persists I would like to advise you to get in touch with your institute's IT department. I had a similar problem when I tried to get information from the NASA JPL Horizons system. Turned out to be the server's IP address was on a blacklist due to frequent request. You might need to check if the port is open or not as well. My best On Fri, Feb 5, 2021 at 12:19 AM Derek Homeier < derek at astro.physik.uni-goettingen.de> wrote: > On 4 Feb 2021, at 9:23 pm, Adrian Price-Whelan > wrote: > > > > It's possible that there are some intermittent issues with the Simbad > database itself, or with your connection. I just tried and it worked for me: > > > > >>> coord.SkyCoord.from_name("LEDA30866") > > > (157.255, 29.63472222)> > > > > Did the error message return any additional information? It's possible > we need to audit the error messages we raise to make sure they provide > enough information for cases like this. > > > Worked for me just as well. The LEDA server in Lyon has been down for some > time, > and came only back online a few days ago, I think. > If it continues to fail for you, perhaps check your cache and proxy > settings (though > I agree a clearer error message would be helpful). > > Cheers, > Derek > > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy > -- Mohammad Shameoni Niaei Astronomer Atat?rk University, Astrophysics Research and Application Center. ERZURUM-TURKEY -------------- next part -------------- An HTML attachment was scrubbed... URL: From drjimsok at gmail.com Fri Feb 5 10:52:49 2021 From: drjimsok at gmail.com (James Sokolowski) Date: Fri, 5 Feb 2021 09:52:49 -0600 Subject: [AstroPy] Astrophotography SW? Message-ID: Folks, PhD in Astronomy & Astrophysics, w/ 25 years in the professional field of data science / analytics / Machine Learning / Artificial Intelligence. Solid IDL and Python programmer, but as I close in on retirement, I'm building the hobby of amateur astrophotography. There are LOTS of commercial tools available, as well as freeware, and that's all well and good. BUT... what I'm really looking for is a solid astronomical image processing & analysis package that has a well-structured Python API... am I crazy?? Virtually all of our generic data science type tools have these interfaces, so extending native application functionality becomes a breeze... So anyway, if folks have suggestions, I'd be all ears. Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From kellecruz at gmail.com Fri Feb 5 11:05:18 2021 From: kellecruz at gmail.com (Kelle Cruz) Date: Fri, 5 Feb 2021 11:05:18 -0500 Subject: [AstroPy] Astrophotography SW? In-Reply-To: References: Message-ID: Hi Jim, I think there is a huge opportunity to build more Astropy resources for astrophotography! There is already an issue in the astropy-tutorials repo: https://github.com/astropy/astropy-tutorials/issues/458. While a couple folks have said they were gonna take a stab at this, I haven't seen or am aware of any progress. More hands on deck would be most welcome! Also, if we wanted more serious amateurs, I would be willing to try to recruit some folks from the Amateur Astronomers Association of New York . They have some very notable astrophotgraphers among their ranks. :) Kelle On Fri, Feb 5, 2021 at 10:56 AM James Sokolowski wrote: > Folks, > > PhD in Astronomy & Astrophysics, w/ 25 years in the professional field of > data science / analytics / Machine Learning / Artificial Intelligence. > Solid IDL and Python programmer, but as I close in on retirement, I'm > building the hobby of amateur astrophotography. > > There are LOTS of commercial tools available, as well as freeware, and > that's all well and good. BUT... what I'm really looking for is a solid > astronomical image processing & analysis package that has a well-structured > Python API... am I crazy?? > > Virtually all of our generic data science type tools have these > interfaces, so extending native application functionality becomes a > breeze... > > So anyway, if folks have suggestions, I'd be all ears. > > Jim > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drjimsok at gmail.com Fri Feb 5 12:52:16 2021 From: drjimsok at gmail.com (James Sokolowski) Date: Fri, 5 Feb 2021 11:52:16 -0600 Subject: [AstroPy] Astrophotography SW? In-Reply-To: References: Message-ID: Kelle, Yeah, it's kindof weird to me coming from a professional background, where most everything was done by scripting our own code, and then today, where mature data science / ML / AI resources are available to do 90% of the grunge work for you, then you add the 10% super-ultra-duper special sauce by extending w/ Python code written to integrate with the tools very easily. Now I should admit there are other APIs and a lot of data scientists also use R, but I'm not a fan of that tool. Now, as I'm just setting up my first kit and trying to decide on S/W to use (acquisition & stacking are done) I see several nice commercial packages, but it's CRAZY that they don't have a Python API (or don't seem to and the docs aren't clear). This sort of S/W development paradigm, where a central authority (commercial or other) maintains the central code repository and users are free to add as they see fit (of course w/o modifying the main code) is amazing in data science. Obviously AstroPy follows this model, but it doesn't have a reasonable GUI-driven interface for the majority of the grunge work... Anyway, very nice to meet you. Jim On Fri, Feb 5, 2021 at 10:06 AM Kelle Cruz wrote: > Hi Jim, > > I think there is a huge opportunity to build more Astropy resources for > astrophotography! There is already an issue in the astropy-tutorials repo: > https://github.com/astropy/astropy-tutorials/issues/458. While a couple > folks have said they were gonna take a stab at this, I haven't seen or am > aware of any progress. More hands on deck would be most welcome! > > Also, if we wanted more serious amateurs, I would be willing to try to > recruit some folks from the Amateur Astronomers Association of New York > . They have some very notable > astrophotgraphers among their ranks. :) > > Kelle > > On Fri, Feb 5, 2021 at 10:56 AM James Sokolowski > wrote: > >> Folks, >> >> PhD in Astronomy & Astrophysics, w/ 25 years in the professional field of >> data science / analytics / Machine Learning / Artificial Intelligence. >> Solid IDL and Python programmer, but as I close in on retirement, I'm >> building the hobby of amateur astrophotography. >> >> There are LOTS of commercial tools available, as well as freeware, and >> that's all well and good. BUT... what I'm really looking for is a solid >> astronomical image processing & analysis package that has a well-structured >> Python API... am I crazy?? >> >> Virtually all of our generic data science type tools have these >> interfaces, so extending native application functionality becomes a >> breeze... >> >> So anyway, if folks have suggestions, I'd be all ears. >> >> Jim >> _______________________________________________ >> AstroPy mailing list >> AstroPy at python.org >> https://mail.python.org/mailman/listinfo/astropy >> > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pdzwig at summaventures.com Fri Feb 5 14:03:24 2021 From: pdzwig at summaventures.com (Peter Dzwig) Date: Fri, 5 Feb 2021 19:03:24 +0000 Subject: [AstroPy] YASQ - Yet Another SkyCoord Question In-Reply-To: References: <1ddc9f2a-d3bc-9bc5-bea9-217e277cce2d@summaventures.com> Message-ID: <338501b6-24b9-2e7f-376b-ad9ba062faea@summaventures.com> Adrian, I get this for 2MASSJ08320052+1912058: "NameResolveError: Unable to find coordinates for name 2MASSJ08320052+1912058 at htttp://cds-web.u-strasbrg.fr/cgi-bin/nph-sesame/A?2MASSJ08320052+1912058" Regards, Peter Dzwig On 04/02/2021 20:23, Adrian Price-Whelan wrote: > Hi Peter, > > It's possible that there are some intermittent issues with the Simbad > database itself, or with your connection. I just tried and it worked for me: > >>>>?coord.SkyCoord.from_name("LEDA30866") > ? ? (157.255, 29.63472222)> > > Did the error message return any additional information? It's possible > we need to audit the error messages we raise to make sure they provide > enough information for cases like this. > > best, > Adrian > > On Thu, Feb 4, 2021 at 3:14 PM Peter Dzwig > wrote: > > All, > > I have been attempting to get RA, Dec from SkyCoord via > SkyCoord.from_name. It claims to be "unable to resolve" quite a few > names. > > As a concrete example, LEDA 30866: > > SkyCoord.from_name(LEDA30866) > > oit goes to CDS at strasbourg and gives me back the message: "Unable to > resolve", yet if I go directly to HyperLEDA > > (a) it is a recognised object (PGC030866); > (b) it cross-identifies it and gives *three* SDSS names (plus others). > > If instead I put in one of the various SDSS names (I have tried all > three) I get the same message. > > The obvious question: why can't it resolve the name? is it because it > hasn't a way to choose between the choice names? > > Can someone clarify - and possibly offer a way to resolve this issue? > > So far I have encountered this issue in about 20% of my searches. > > > Many thanks, > > Peter > -- > > Dr. Peter Dzwig > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy > > > > -- > Adrian M. Price-Whelan > Flatiron Institute, NYC > http://adrn.github.io > (he / him) -- Dr. Peter Dzwig From derek at astro.physik.uni-goettingen.de Fri Feb 5 15:14:43 2021 From: derek at astro.physik.uni-goettingen.de (Derek Homeier) Date: Fri, 5 Feb 2021 21:14:43 +0100 Subject: [AstroPy] YASQ - Yet Another SkyCoord Question In-Reply-To: <338501b6-24b9-2e7f-376b-ad9ba062faea@summaventures.com> References: <1ddc9f2a-d3bc-9bc5-bea9-217e277cce2d@summaventures.com> <338501b6-24b9-2e7f-376b-ad9ba062faea@summaventures.com> Message-ID: <73489E49-1007-4E2D-81C9-D5769F71600F@astro.physik.uni-goettingen.de> On 5 Feb 2021, at 8:03 pm, Peter Dzwig wrote: > > I get this for 2MASSJ08320052+1912058: > > "NameResolveError: Unable to find coordinates for name > 2MASSJ08320052+1912058 at > htttp://cds-web.u-strasbrg.fr/cgi-bin/nph-sesame/A?2MASSJ08320052+1912058? > Assuming the "htttp://cds-web.u-strasbrg.fr? is a typo, a direct web query for "http://cdsweb.u-strasbg.fr/cgi-bin/nph-sesame/A?2MASS J08320052+1912058" also returns a ?no object found in the database? (as well as in the Simbad/Vizier forms). Cheers, Derek From brad.p.holden at gmail.com Fri Feb 5 17:20:12 2021 From: brad.p.holden at gmail.com (Brad Holden) Date: Fri, 5 Feb 2021 14:20:12 -0800 Subject: [AstroPy] YASQ - Yet Another SkyCoord Question In-Reply-To: <73489E49-1007-4E2D-81C9-D5769F71600F@astro.physik.uni-goettingen.de> References: <1ddc9f2a-d3bc-9bc5-bea9-217e277cce2d@summaventures.com> <338501b6-24b9-2e7f-376b-ad9ba062faea@summaventures.com> <73489E49-1007-4E2D-81C9-D5769F71600F@astro.physik.uni-goettingen.de> Message-ID: The correct object name is : 2MASS J08320053+1912058 http://simbad.u-strasbg.fr/simbad/sim-id?Ident=%401091342&Name=2MASS%20J08320053%2b1912058&submit=submit On Fri, Feb 5, 2021 at 12:15 PM Derek Homeier < derek at astro.physik.uni-goettingen.de> wrote: > On 5 Feb 2021, at 8:03 pm, Peter Dzwig wrote: > > > > I get this for 2MASSJ08320052+1912058: > > > > "NameResolveError: Unable to find coordinates for name > > 2MASSJ08320052+1912058 at > > htttp:// > cds-web.u-strasbrg.fr/cgi-bin/nph-sesame/A?2MASSJ08320052+1912058? > > > Assuming the "htttp://cds-web.u-strasbrg.fr? is a typo, a direct web > query for > > "http://cdsweb.u-strasbg.fr/cgi-bin/nph-sesame/A?2MASS J08320052+1912058" > > also returns a ?no object found in the database? (as well as in the > Simbad/Vizier forms). > > Cheers, > Derek > > > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From erik.m.bray at gmail.com Sun Feb 7 09:03:12 2021 From: erik.m.bray at gmail.com (E. Madison Bray) Date: Sun, 7 Feb 2021 15:03:12 +0100 Subject: [AstroPy] Astrophotography SW? In-Reply-To: References: Message-ID: Hi Jim, If it's a GUI you want you could check out ginga: https://ejeschke.github.io/ginga/ I don't really know what you need in terms of astrophotography, and it's not necessarily specifically geared toward that. But the nice thing about ginga is that it's a whole toolkit with many built-in standard tools (image, spectra viewers, etc.) with which you can fully customize the layout for your own applications, as well as create plugins for around your own Python scripts. Check out the developer documentation in particular for ideas of what you might be able to do with it: https://ginga.readthedocs.io/en/latest/dev_manual/index.html A similar, though slightly different product more geared toward general data analysis is Glue, but it also provides a highly customizable GUI environment: http://glueviz.org/ On Fri, Feb 5, 2021 at 6:52 PM James Sokolowski wrote: > > Kelle, > > Yeah, it's kindof weird to me coming from a professional background, where most everything was done by scripting our own code, and then today, where mature data science / ML / AI resources are available to do 90% of the grunge work for you, then you add the 10% super-ultra-duper special sauce by extending w/ Python code written to integrate with the tools very easily. Now I should admit there are other APIs and a lot of data scientists also use R, but I'm not a fan of that tool. > > Now, as I'm just setting up my first kit and trying to decide on S/W to use (acquisition & stacking are done) I see several nice commercial packages, but it's CRAZY that they don't have a Python API (or don't seem to and the docs aren't clear). This sort of S/W development paradigm, where a central authority (commercial or other) maintains the central code repository and users are free to add as they see fit (of course w/o modifying the main code) is amazing in data science. Obviously AstroPy follows this model, but it doesn't have a reasonable GUI-driven interface for the majority of the grunge work... > > Anyway, very nice to meet you. > Jim > > On Fri, Feb 5, 2021 at 10:06 AM Kelle Cruz wrote: >> >> Hi Jim, >> >> I think there is a huge opportunity to build more Astropy resources for astrophotography! There is already an issue in the astropy-tutorials repo: https://github.com/astropy/astropy-tutorials/issues/458. While a couple folks have said they were gonna take a stab at this, I haven't seen or am aware of any progress. More hands on deck would be most welcome! >> >> Also, if we wanted more serious amateurs, I would be willing to try to recruit some folks from the Amateur Astronomers Association of New York. They have some very notable astrophotgraphers among their ranks. :) >> >> Kelle >> >> On Fri, Feb 5, 2021 at 10:56 AM James Sokolowski wrote: >>> >>> Folks, >>> >>> PhD in Astronomy & Astrophysics, w/ 25 years in the professional field of data science / analytics / Machine Learning / Artificial Intelligence. Solid IDL and Python programmer, but as I close in on retirement, I'm building the hobby of amateur astrophotography. >>> >>> There are LOTS of commercial tools available, as well as freeware, and that's all well and good. BUT... what I'm really looking for is a solid astronomical image processing & analysis package that has a well-structured Python API... am I crazy?? >>> >>> Virtually all of our generic data science type tools have these interfaces, so extending native application functionality becomes a breeze... >>> >>> So anyway, if folks have suggestions, I'd be all ears. >>> >>> Jim >>> _______________________________________________ >>> AstroPy mailing list >>> AstroPy at python.org >>> https://mail.python.org/mailman/listinfo/astropy >> >> _______________________________________________ >> AstroPy mailing list >> AstroPy at python.org >> https://mail.python.org/mailman/listinfo/astropy > > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy From hessman at astro.physik.uni-goettingen.de Fri Feb 26 03:54:57 2021 From: hessman at astro.physik.uni-goettingen.de (Frederic V. Hessman) Date: Fri, 26 Feb 2021 09:54:57 +0100 Subject: [AstroPy] Table.pprint Message-ID: <56981438-E51D-4A3E-A17C-9D88EE6D2E3F@astro.physik.uni-goettingen.de> Surely there's a simple way to pprint only selected columns of a table, something like >>> tabl.pprint (names=['col1','col99']) but I haven't seen anything obvious. Yes, there are brute force work-arounds, but.... Rick From thomas.boch at astro.unistra.fr Fri Feb 26 04:38:52 2021 From: thomas.boch at astro.unistra.fr (Thomas Boch) Date: Fri, 26 Feb 2021 10:38:52 +0100 Subject: [AstroPy] Table.pprint In-Reply-To: <56981438-E51D-4A3E-A17C-9D88EE6D2E3F@astro.physik.uni-goettingen.de> References: <56981438-E51D-4A3E-A17C-9D88EE6D2E3F@astro.physik.uni-goettingen.de> Message-ID: <769cfefc-e33c-91ee-b49e-430a8fa32728@astro.unistra.fr> Hi Rick, What about: tabl['col1', 'col99'].pprint() ? Cheers, Thomas Le 26/02/2021 ? 09:54, Frederic V. Hessman a ?crit?: > Surely there's a simple way to pprint only selected columns of a table, something like > >>>> tabl.pprint (names=['col1','col99']) > but I haven't seen anything obvious. Yes, there are brute force work-arounds, but.... > > Rick > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy From aldcroft at head.cfa.harvard.edu Fri Feb 26 06:31:58 2021 From: aldcroft at head.cfa.harvard.edu (Aldcroft, Thomas) Date: Fri, 26 Feb 2021 06:31:58 -0500 Subject: [AstroPy] Table.pprint In-Reply-To: <769cfefc-e33c-91ee-b49e-430a8fa32728@astro.unistra.fr> References: <56981438-E51D-4A3E-A17C-9D88EE6D2E3F@astro.physik.uni-goettingen.de> <769cfefc-e33c-91ee-b49e-430a8fa32728@astro.unistra.fr> Message-ID: Indeed `tabl['col1', 'col99'].pprint()` is the right idiom for printing a subset of columns. I see the docs didn't include anything quite like that, so I added an example. See: https://github.com/astropy/astropy/pull/11354. BTW, starting with the next release of astropy (4.3) you can persistently include or exclude selected column names from being printed. This can be helpful if you have a table that has some uninteresting columns, or perhaps a very wide column that dominates printing. See: https://docs.astropy.org/en/latest/table/access_table.html#hiding-columns - Tom On Fri, Feb 26, 2021 at 4:45 AM Thomas Boch wrote: > Hi Rick, > > What about: > > tabl['col1', 'col99'].pprint() > > ? > > Cheers, > > Thomas > > Le 26/02/2021 ? 09:54, Frederic V. Hessman a ?crit : > > Surely there's a simple way to pprint only selected columns of a table, > something like > > > >>>> tabl.pprint (names=['col1','col99']) > > but I haven't seen anything obvious. Yes, there are brute force > work-arounds, but.... > > > > Rick > > _______________________________________________ > > AstroPy mailing list > > AstroPy at python.org > > https://mail.python.org/mailman/listinfo/astropy > > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hessman at astro.physik.uni-goettingen.de Fri Feb 26 07:22:34 2021 From: hessman at astro.physik.uni-goettingen.de (Frederic V. Hessman) Date: Fri, 26 Feb 2021 13:22:34 +0100 Subject: [AstroPy] Table.pprint In-Reply-To: References: <56981438-E51D-4A3E-A17C-9D88EE6D2E3F@astro.physik.uni-goettingen.de> <769cfefc-e33c-91ee-b49e-430a8fa32728@astro.unistra.fr> Message-ID: Tom & Thomas, Many thanks - I should have known/noticed. I note, however, that the syntax that is mentioned (in the docs in a different context) t['a','c'] officially results in a copy of the table, which I may or may not want (who knows - the table might be gargantuous!), while something internal like t.pprint (['a','c']) or t.pprint (names=['a','c']) though not as elegant looking, perhaps, would permit the printing with no copying needed. After all, I just want the table printed out. Re docs: I would still add more examples to the docs to emphasize the range of options, something like Print table or column print(t) # Print formatted version of table to the screen t.pprint() # Same as above t.pprint(show_unit=True) # Show column unit t.pprint(show_name=False) # Do not show column names t.pprint_all() # Print full table no matter how long / wide it is (same as t.pprint(max_lines=-1, max_width=-1)) t.more() # Interactively scroll through table like Unix "more" print(t['a']) # Formatted column values t['a'].pprint() # Same as above, with same options as Table.pprint() t['a'].more() # Interactively scroll through column t['a','b'].more() # Interactively scroll 2 columns (also works with pprint) at the top (for obivously superficial readers like myself) and below Hiding columns The Table class has two ways to selectively show certain columns when using any of the print methods. For simple cases, use the standard syntax t['col1','col999'].pprint() (a copy of the table is made). For more formal or complicated cases, using the functionality to consistently show or hide certain columns within the table. The latter method can be useful for columns that are very wide or else ?uninteresting? for various reasons. ... Again, many thanks! Rick > On 26 Feb 2021, at 12:31, Aldcroft, Thomas wro > te: > > Indeed `tabl['col1', 'col99'].pprint()` is the right idiom for printing a subset of columns. I see the docs didn't include anything quite like that, so I added an example. See: > https://github.com/astropy/astropy/pull/11354 . > > BTW, starting with the next release of astropy (4.3) you can persistently include or exclude selected column names from being printed. This can be helpful if you have a table that has some uninteresting columns, or perhaps a very wide column that dominates printing. See: > https://docs.astropy.org/en/latest/table/access_table.html#hiding-columns > > - Tom > > > On Fri, Feb 26, 2021 at 4:45 AM Thomas Boch > wrote: > Hi Rick, > > What about: > > tabl['col1', 'col99'].pprint() > > ? > > Cheers, > > Thomas > > Le 26/02/2021 ? 09:54, Frederic V. Hessman a ?crit : > > Surely there's a simple way to pprint only selected columns of a table, something like > > > >>>> tabl.pprint (names=['col1','col99']) > > but I haven't seen anything obvious. Yes, there are brute force work-arounds, but.... > > > > Rick > > _______________________________________________ > > AstroPy mailing list > > AstroPy at python.org > > https://mail.python.org/mailman/listinfo/astropy > > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy -------------- next part -------------- An HTML attachment was scrubbed... URL: From aldcroft at head.cfa.harvard.edu Fri Feb 26 09:18:53 2021 From: aldcroft at head.cfa.harvard.edu (Aldcroft, Thomas) Date: Fri, 26 Feb 2021 09:18:53 -0500 Subject: [AstroPy] Table.pprint In-Reply-To: References: <56981438-E51D-4A3E-A17C-9D88EE6D2E3F@astro.physik.uni-goettingen.de> <769cfefc-e33c-91ee-b49e-430a8fa32728@astro.unistra.fr> Message-ID: On Fri, Feb 26, 2021 at 7:23 AM Frederic V. Hessman < hessman at astro.physik.uni-goettingen.de> wrote: > Tom & Thomas, > > Many thanks - I should have known/noticed. > > I note, however, that the syntax that is mentioned (in the docs in a > different context) > > t['a','c'] > > officially results in a copy of the table, which I may or may not want > (who knows - the table might be gargantuous!), while something internal like > > t.pprint (['a','c']) > > or > > t.pprint (names=['a','c']) > > though not as elegant looking, perhaps, would permit the printing with no > copying needed. After all, I just want the table printed out. > That is a fair point about copying and something to consider. I had the very same thought reading through the docs, and I always wonder if "column slicing" should behave like row slicing and return a view instead of copy. Changing this now might not be an option, however... There is another workaround, admittedly ugly: >>> Table(t.columns['a', 'c'], copy=False).pprint() - Tom > > Re docs: I would still add more examples to the docs to emphasize the > range of options, something like > > > *Print table or column* > > print(t) # Print formatted version of table to the screent.pprint() # Same as abovet.pprint(show_unit=True) # Show column unitt.pprint(show_name=False) # Do not show column namest.pprint_all() # Print full table no matter how long / wide it is (same as t.pprint(max_lines=-1, max_width=-1)) > t.more() # Interactively scroll through table like Unix "more" > print(t['a']) # Formatted column valuest['a'].pprint() # Same as above, with same options as Table.pprint()t['a'].more() # Interactively scroll through column > t['a','b'].more() # Interactively scroll 2 columns (also works with pprint) > > > at the top (for obivously superficial readers like myself) and below > > Hiding columns > > > The Table > class > has two ways to selectively show certain columns when using any of the > print methods. For simple cases, use the standard syntax > > t['col1','col999'].pprint() > > (a copy of the table is made). For more formal or complicated cases, > using the functionality to consistently show or hide certain columns within > the table. The latter method can be useful for columns that are very wide > or else ?uninteresting? for various reasons. ... > > Again, many thanks! > > Rick > > On 26 Feb 2021, at 12:31, Aldcroft, Thomas > wro > > te: > > Indeed `tabl['col1', 'col99'].pprint()` is the right idiom for printing a > subset of columns. I see the docs didn't include anything quite like that, > so I added an example. See: > https://github.com/astropy/astropy/pull/11354. > > BTW, starting with the next release of astropy (4.3) you can persistently > include or exclude selected column names from being printed. This can be > helpful if you have a table that has some uninteresting columns, or perhaps > a very wide column that dominates printing. See: > > https://docs.astropy.org/en/latest/table/access_table.html#hiding-columns > > - Tom > > > On Fri, Feb 26, 2021 at 4:45 AM Thomas Boch > wrote: > >> Hi Rick, >> >> What about: >> >> tabl['col1', 'col99'].pprint() >> >> ? >> >> Cheers, >> >> Thomas >> >> Le 26/02/2021 ? 09:54, Frederic V. Hessman a ?crit : >> > Surely there's a simple way to pprint only selected columns of a table, >> something like >> > >> >>>> tabl.pprint (names=['col1','col99']) >> > but I haven't seen anything obvious. Yes, there are brute force >> work-arounds, but.... >> > >> > Rick >> > _______________________________________________ >> > AstroPy mailing list >> > AstroPy at python.org >> > https://mail.python.org/mailman/listinfo/astropy >> >> _______________________________________________ >> AstroPy mailing list >> AstroPy at python.org >> https://mail.python.org/mailman/listinfo/astropy >> > > _______________________________________________ > AstroPy mailing list > AstroPy at python.org > https://mail.python.org/mailman/listinfo/astropy > -------------- next part -------------- An HTML attachment was scrubbed... URL: