home astro/eps 12 bio projects talks photos weather code links
 

DR MICHAEL H WONG
ASSOCIATE RESEARCHER

UNIVERSITY OF CALIFORNIA
ASTRONOMY DEPARTMENT
BERKELEY CA 94720-3411

510/224-3411 (voice)
510/642-3411 (fax)

Uploading multiple files from the command line using curl and the FTPS protocol
Sat 2022-06-11 14:02  
[permalink]

I needed to upload a bunch of files to the MAST archive, but FTP is no longer allowed because it is not secure. The MAST announcement recommends "GUI clients Filezilla, Cyberduck," but I have a purely emotional response to this: I don't feel the maximum enjoyment of techie accomplishment if I have to click bubbles in a tool called Cyberduck. I want to use the command line, like I used to be able to with FTP.

The MAST announcement said you could use curl, but it didn't give a good example. I wanted a way to do the following:

  • Run on the command line.
  • Upload a whole bunch of files to a single directory.
  • Require typing password only once.
Basically, I was looking for the equivalent of typing mput hlsp_* in FTP. This is what worked for the MAST archive:

      curl --ssl-reqd -u USERNAME 
           -T 'hlsp_{dogs.txt,cats.fits,birds-and-worms.fits}'
           ftp://archive.stsci.edu/pub/MY_DIR/

--ssl-reqd creates an explicit FTPS connection rather than a FTP connection, as required by MAST security.

-u USERNAME tells what username that curl should send to the server (for this system it is our email address). You would be able to tell curl to also send your password by using -u USERNAME:PASSWORD, but I prefer to leave password blank so that I can enter it invisibly at the prompt.

-T 'hlsp_{dogs.txt,cats.fits,birds-and-worms.fits}' is the way to specify several files. I tried to use -T 'hlsp_*'. But that does not work, because curl is doing URL globbing, which doesn't support a * wildcard. URL globbing was designed to loop over a set of URLs following a pattern, not to loop over a set of local files.

ftp://archive.stsci.edu/pub/MY_DIR/ is the destination URL, and when uploading multiple files, this must end with a "/". Some testing suggests that for MAST, you can also start the URL with ftps:// and omit the --ssl-reqd option to perform the transfer under an implicit FTPS connection.

 

The rainbow collection.
Tue 2022-04-05 22:06  
[permalink]

   

Here are some planetary science rainbow logos, in case anyone wants to use them for anything. I made stickers of the rainbow pixel-rover (based on one of the fiducial tattoos on Curiosity), so I can give you one if you see me in person. Maybe I'll do the worm next.

Today's rainbow-fest is inspired by reading the latest article in Scientific American about how NASA declined to remove James Webb's name from its flagship telescope. I already commented on this issue below, but check out the best new thing in this article: the quote from Scott Gaudi.

The article pointed me to a cool resource, the Astronomy and Astrophysics Outlist. I read through all 800+ names, which gave plenty of time for a swirl of thoughts:

  • Oh [him/her/them]?
  • Wow there's a lot of Berkeley.
  • Now that you mention it, duh.
  • Hm. This list is not complete.
  • All these people would have been fired 60 years ago.
  • That affiliation? This list has been around for a while.
  • So sweet that [he/she] took the time to sign the allies list !!
  • Sapphic can be an identity label? Neat.
  • Schools that have "research professors" are cooler than Berkeley.

 

The Klaus Teuber Space Telescope?
Fri 2022-01-07 14:50  
[permalink]

My friend noticed that the segmented JWST primary mirror matches the segmented playing board of Settlers of Catan. ("The black thing in the middle is the robber," he said.)

NASA should rename the telescope after Catan creator Klaus Teuber. This would have double benefits: It would give proper credit and avoid a copyright infringement suit against NASA for blatantly copying the playing board. But more importantly, it would eliminate the telescope's problematic association with a bureaucrat who enacted anti-queer policies in NASA and the State department as part of the "lavender scare."

Actually the best choice — if NASA wanted to return to the convention of naming space observatories after scientists — would be renaming the telescope after Dr. Frank Kameny. Kameny actually lost his job due to anti-LGBTQ discrimination (although not while Webb was in charge of anything), driving him to leave science for activism. He was mentioned in the Scientific American piece that originally boosted the issue of James Webb's problematic associations.

Whatever its name, the telescope's job is to busily create infrared rainbows behind a lavender sunshield, making it possibly the gayest thing in space.

 

Using alpine as an IMAP client for G-suite at UC Berkeley.
Mon 2021-10-11 10:41  
[permalink]

It's been 8+ years since my last post on how to keep ancient mail readers working with the most popular corporate email provider. The instructions there about encrypting your pine password file still work. But Google's "app passwords" can't be used any more at Berkeley, so here is the current method.

You need to have Alpine v2.22 or above. To trigger authentication with the currently-supported OAUTH2 method, use settings as shown above. I got this from the relevant page in Eduardo Chappa's Alpine project. You also have to go to console.developers.google.com and follow these helpful instructions from UMBC, which are far more complicated than the old procedure of creating an app password. There are also instructions for this part at the Alpine project, but the UMBC instructions are slightly easier to follow (and I found them first).

Now sometimes when you open Alpine, it will show a screen with an ugly Google link. Copy/paste that to a browser where you are logged in to your G-suite account, copy the key that the link provides, come back to Alpine, and enter that key after pressing "C" for "enter Code."

 

Python in a TI graphing calculator.
Fri 2021-07-30 11:36  
[permalink]

I just saw an article/ad for a Texas Instruments TI-84 that has Python. This is so exciting and cool. This is what I want for Christmas, even though I'm pretty sure I would not actually use it. I made a whole pros/cons list to understand how completely irrational my attraction to this device is:

Pros Cons
  • Cool
  • Has Python
  • Very nice color blue and green keys
  • TI calculators are well made and virtually last forever
  • I already have a calculator
  • I already have Pythons
  • Easier to type/view code on a computer
  • Cannot use when wearing contacts (keys/screen too small)
  • Does not have as many dedicated functions as my TI-30XA (DEG->RAD, DMS->DD, etc.)
  • No QWERTY
  • Will Python last forever?

 

Interactive Jupiter images at NOIRLab.
Tue 2021-05-11 16:47  
[permalink]

NOIRLab put together a really cool interactive experience that lets you compare simultaneous Jupiter images at multiple wavelengths. The data were obtained at Hubble and Gemini North observatories.

CREDITS: I'm grateful to NOIRLab staff for producing the release, with special appreciation to Vanessa Thomas for patiently meticulous writing, Lars Christensen for the idea of doing an image comparison, and Mahdi Zamani for giving the Jupiter data his special touch of vitality and glamour. The Gemini data are from program GN-2016B-FT-18 (PI Wong) and the Hubble data are from program GO-14839 (PI de Pater). Observations and processing were described in Wong et al. (2020) and de Pater et al. (2019). This work was enabled by the location of the Gemini North telescope within the Maunakea Science Reserve, adjacent to the summit of Maunakea. I am grateful for the privilege of observing Ka'āwela (Jupiter) from a place that is unique in both its astronomical quality and its cultural significance.

 

Great conjuction 2020.
Sun 2020-12-06 19:45  
[permalink]

I'm fascinated with the 2020 Great Conjunction, because (1) there is an entire word ("great conjunction") specifically reserved for when Jupiter and Saturn are in the same place in the sky, and (2) Hubble would be able to capture images of both of them in a single pointing. But this is just a dream, because the relative positions of the Earth, Jupiter, and Saturn means that the grand giants appear too close to the Sun for Hubble to target. Otherwise, a parallel exposure using HST's ACS and WFC3 cameras could have imaged both planets at the same time!

Friends have been asking me about this event, so here is some more info:

  • When will it happen? The planets will be closest to each other in the sky on December 21 at 18:21 UTC (09:21 PST, thank you timeanddate.com), although this could vary by a few minutes depending on your location on the Earth. It will be daytime for half of us (including those in California), but that's OK. Jupiter and Saturn will be astoundingly close together for a few days before and after 21 December too. The best time to view them is just after sunset. They will be following the Sun down.
  • But someone said it was at 13:30 UTC. The conjunction is indeed closer to 13:30 UTC (04:30 PST), but conjunction specifically means the planets are at the same east-west coordinate (right ascension) in the sky. Because their paths are at different angles, the closest approach (called the "appulse") will be a few hours later at 18:21 UTC, when Jupiter has passed slightly to the east of Saturn.
  • Do I need a telescope? The great conjunction can be enjoyed without a telescope, especially if you get in the habit of taking a peek at the planets every few days leading up to it. A nice diagram here shows how Jupiter and Saturn approach over time. At conjunction, they will be closer together than any of the bright stars in the Pleiades. So depending on your eyesight, you may still be able to tell that they are two separate points of light. With binoculars, you'll be able to see Saturn's unique shape (the rings), and possibly some of the major satellites. With a telescope, you can see details on the disk of Jupiter, and the gap between Saturn and its rings... perhaps in a single frame! I am very excited to see what spectacular images the amateur astronomers manage to produce.

CREDITS: Timing and distance information comes from JPL Horizons, where geocentric observer position was selected. The simulated sky image was generated by the JPL Solar System Simulator, and the instrument footprints themselves were taken from the WFC3 Instrument Handbook. Gordy Bjoraker generated the solar system perspective view using the open-source Cosmographia visualization tool.