Showing posts with label time. Show all posts
Showing posts with label time. Show all posts

Tuesday, December 31, 2024

An art blast from the past

It's not often one receives a present from one's younger self for Christmas, but so it was this year: my mom found a nativity set I'd made out of clay (each piece dutifully inscribed “DB 2000”, when I was eleven) and wrapped it for me. Here's a photo:

It's always interesting to see what one's younger art looks like (especially when you've forgotten about in it the intervening decades). I notice with amusement a few things that feel very familiar, such as minute details and texture in some places and nothing in other (for instance, all the beards have detail scratched into them in what is otherwise a fairly stylized production). There's also a rigid adherence to a small set of colors without any mixing, but utilizing them in imaginative ways; I count just six colors of clay (purple, brown, tan, yellow, orange, light blue), and it doesn't look like I mixed any to produce different shades. Both of these are things I still struggle with to an extent in painting: it's easy to get lost in details while neglecting larger parts of a composition, and I still tend to use a relatively small number of colors in any single painting session (though I at least do mix them, now).

On the positive side, I'm pretty impressed with how this came out. Even at eleven I was coming up with interesting little details like the different crowns on the magi or the decorations on their gifts. (I'm pretty sure from close inspection that the first one was supposed to be holding a gold bar, to go along with the frankincense and myrrh of the others.) Anyway, that's a little something to close the year out with. Hard to believe 2024 is finally over! A hui hou!

Saturday, September 30, 2023

Life lived in one place

As of today it's been about two years since I moved back to Hawaii from Australia. Together with the nine years I spent in Hawaii before, I've now lived a little over eleven years here. That's now finally (and definitively) longer than the previous longest span of time I lived somewhere, in California (which was about nine and a half years). I was going to write about this last year when I surpassed that record, but I have once again managed to get off-by-one-year in my reckoning of anniversaries. (I suppose summer trips back home during college would've added several months to the California total, so waiting another year is playing it safe.) We'll see if I can manage to beat my record for continuously living in one place someday…though given past events I'll almost certainly remember it a year late if I do.

Anyway, that's about it for this post, just a little rumination on life. My family moved multiple times during my early childhood, so while I've lived in quite a number of places, I've only spent more than five years in just two, California and Hawaii. Hopefully, I'm finally at a point in life where I can minimize the number of future moves I have to make, as after experiencing multiple different climates in my life, I've discovered that “tropical island” suits me juuuust fine. We shall see what the future holds, I suppose. A hui hou!

Saturday, December 31, 2022

Happy New Year 2023!

In a piece of good news for the final hours of 2022, I discovered an early Christmas gift in that the two papers from my PhD, the completion of which has eaten up so much of my free time this year, were officially published in the Monthly Notices of the Royal Astronomical Society on Christmas Eve. It's been a multi-year journey writing these papers (I think I started back in 2019 or possibly even late 2018), and I originally submitted them to MNRAS at the beginning of April so it's been almost 8 months getting them published as well. (Much longer than the average, according to my advisors.) These papers have been hanging over my head for most of the year and taken a lot of my outside-of-work hours to bring to completion, so I am extraordinarily relieved to see them finally published; I am, in a sense, finally “done” with my PhD. And now that I am, and have more energy and free time to do so, I hope to have a post (or perhaps a short series) out sometime next month actually explaining what my thesis is about. Tangentially, even counting this post, this year will mark the lowest number of posts-per-year for this blog, and it's hard to escape the conclusion that a large part of that was me not being able to summon the motivation to write more when I was already spending so much of my evenings and weekends finishing up papers/responding to referee reports/checking proofs for errors that inexplicably appear in the process of typesetting. With that out of the way, I hope to have a bit more time for doing interesting things, which will hopefully translate into more posts sharing said interesting things.

My life hasn't been completely devoid of interest this year, of course; getting a drone has been and continues to be a source of excitement and fresh perspectives on things, even if my dreams of up-close lava examination were dashed by no-fly zones during Mauna Loa's streak-breaking eruption. That aside, there are still plenty of awesome landscapes to explore on this island, and I expect to continue to do so next year.

And it's also true that some things in life are better when they're not exciting, like one's employment status and having a steady place to live. Thankfully both of those have been staidly boring this year, just the way I like it. That's not to say that my job is boring; while it might not be exciting, it remains consistently interesting, for which I am grateful. I've learned a lot about how DRAGONS works over the past year and have been able to make some significant contributions of my own (along with a lot of small improvements in between larger projects). Ultimately 2023 looks to be largely more of the same, and I am very much ready for it.

With that, as the firecrackers continue to thunder intermittently in the distance and 2022 draws to a close, I look forward to another hopefully “unexciting” year to come. (Though there may be some things of interest on the horizon to share.) A hui hou!

Monday, September 19, 2022

Volca-nomenclature in Hilo's roads

Hawaiʻi island is built (at least the portion of it above the ocean's surface) from five volcanoes: Kohala, Maunakea, Hualālai, Mauna Loa, and Kīlauea. Given the importance of these volcanoes to the people who live on the island, it's hardly surprising that some of Hilo's streets are named after them. There's no street named after Kohala that I can find, but the other four are all represented. What's interested me for some years, however, is the particular streets the names have been applied to.

Let's start with Maunakea and Mauna Loa; they're the two biggest volcanoes on the island and the only two directly visible from Hilo. The modern town lies mainly on lava flows from Mauna Loa, though a small part of it is located on Maunakea north of the Wailuku river (which flows along the boundary line between the two volcanoes). Given the prominence of these two volcanoes and the place of Maunakea in Hawaiian culture, you might expect their names to be attached to prominent streets in Hilo. So I find it somewhat amusing that the eponymous Mauna Kea and Mauna Loa Streets are both tiny alleys in a residential part of town, barely wider than one lane and quite short.

Screenshot showing four streets in Hilo named after various volcanoes on the island.

You can see all four streets in the image above, and just how short the first two are. Unless you live on those streets, you'll pretty much never have occasion to drive on them. (Though I have on occasion driven down the unlabeled street that passes through both of them.) Hualālai, though not visible over the Saddle between Maunakea and Mauna Loa, fares better with its eponymous two-lane road Hualalai Street. It's moderately longer, with a number of shops and services located along it, and I probably have occasion to drive at least part of it perhaps once or twice a month. (Not sure I've ever driven that little wiggly bit at the southwest end, though.) When I had to retake the driving test in May to get my driver license again after letting it lapse in Australia part of the route involved both Hualalai Street and Kilauea Avenue.

Speaking of which, the image above is actually incomplete, for the reason that Kilauea Avenue is actually several times longer than the other three volcanically-christened roads. Here's another picture which shows its full extent:

Zoomed-out image showing four streets in Hilo named after various volcanoes.

I'm not sure if Kilauea Avenue is the longest road in Hilo, but it's certainly up there. It's interesting to me that of the four volcanoes with streets named after them, Kīlauea gets by far the longest (and widest, going up to four lanes for perhaps a third of its length). While Hilo has no official "Main Street", I could make a decent case that Kilauea Avenue comes pretty close to filling the position. (Personally I probably drive on at least parts of it a few times a month, on average.) It's interesting because Kīlauea itself isn't visible from Hilo, and while it's one of the two most active volcanoes on the island, unlike Mauna Loa its eruptions pose no direct threat to Hilo.

Of course, it could also be chance and historical development. Hilo was much smaller in the past, after all, and it might be that when the streets were named they were closer in size and it wasn't obvious which might expand in the future. According to oral tradition, Hilo is the site of the first human settlement in the islands, with archaeology suggesting it's been continuously inhabited for around a thousand years at this point, so it's possible whoever named the roads expected Mauna Kea and Mauna Loa Streets to become bigger in the future.

A map from 1917 showing the modern downtown area of Hilo.

I did a little looking around and found Old Maps Online, which…well, you can probably guess what it does from the name. Searching for Hilo led me to the map above, from 1917. It's jaw-dropping to me to see just how much smaller Hilo was a hundred years ago, but what I found interesting is that I'm pretty sure all four streets are on it. Hualalai Street is a bit shorter, but other than that it looks like all four were pretty much in their current locations already over a century ago. It's hard to gauge where Kilauea Avenue stops on this map, since there isn't a highway present for it to merge into and it seems to turn into a road between Hilo and settlements further uphill, but it tracks its modern course quite well from what I could see. Unfortunately there are no street names on this map, and I don't know when the names were officially assigned. But it looks like there's a good chance that whenever they were the streets probably weren't too different from their modern course.

Ultimately it's a minor factoid about Hilo, but it's one I've had in the back of my mind to share for literal years at this point. There may be more history-related posts in this vein to come; I've been getting more interested in local history recently and learning some interesting things (for instance, you may notice the presence of a railroad track on the map above which is not there in the present day). We'll see where it goes. A hui hou!

Tuesday, May 17, 2022

Birthday #33

Another trip around the Sun, another birthday. The first one I've spent in Hilo since 2017, in fact. Which in itself is a birthday present. We finally got some belated winter rain for most of April and the beginning of May, but the weather's been really pleasant these past two weeks or so, with a mix of brilliant sunny days, enough clouds to keep it from getting too hot, and light showers.

This past weekend was AstroDay here in Hilo (also my 137th birthday on Mercury!), annual event where various observatories and astronomy-related organizations (like the UH Hilo astronomy department) set up tables in the mall and engage with the public. I've volunteered before both as an undergrad and with the JCMT, but the latest I would've done it would've been 2015, so it's been a while since I last participated. This time I was at the Gemini Observatory table with a few co-workers, and while it was rather draining (so many people!) it was also a really positive experience. It's nice to interact with a generally very supportive and interested public and engage in some outreach, and with the pandemic this was also my first chance to really work together with some of colleagues in person.

Anyway, I'm off to play board games with some friends as a birthday get-together this evening. Here's to many more birthdays in Hawaii!

Sunday, December 12, 2021

So apparently I'm a morning person now...

 ...and I'm not entirely happy about it.

For some context, I actually was a morning person in my teens (shocking, I know), and even up through college, where a combination of job shifts occasionally starting at 6 AM and having at least one class at 8 or 9 AM almost every semester enforced a certain "early to bed, early to rise" ethos. Over time, after college, this gradually shifted to being more of an evening person; this was in turn partly due to jobs (like working at the Visitor Information Station or as a telescope operator) that required staying up late, but even while working a desk job for the JCMT I found that my most productive time of day was typically in late afternoon to evening, and I would usually find myself getting to bed later in the evening.

Starting grad school, with the attendant need to conform my schedule to that of the morning train into Swinburne, represented a good opportunity to readjust my schedule slightly earlier in the day, though not terrifically early; I'd usually get into Swinburne about 9:30 in the morning. However, all that gradually eroded with the pandemic and the endless centuries months of working from home. With no need (or ability) to catch the train, it was only morning meetings or events that necessitated my wakefulness, and thankfully Swinburne was pretty good about not scheduling such things earlier than 10 AM. Over the course of several months, my natural sleep cycle settled on going to bed between midnight and 1 AM, and waking up between about 8 and 9 AM. (Setting your own work hours is the [very] double-edged sword of grad student life.)

Upon getting the job offer with Gemini, I contemplated using the move to reset my schedule forward a bit again. This was partly because, due to the time difference between Hawaii (Gemini North) and Chile (Gemini South), events scheduled for both locations have to happen in the morning in Hawaii (which is afternoon in Chile). The flight from Melbourne to California was enough of a time difference that after three or four days of heavy jetlag I completely readjusted to Pacific time during the week I spent with my family. Then, upon moving to Hawaii, the jetlag from traveling west manifested as being (to me) a very early morning person, waking up at 5 or 6 AM and getting tired by 9 PM.

I was far too busy taking care of things upon my arrival to pay too much attention to my sleep schedule, and it was only some time later that it slowly dawned (no pun intended) on me that I was still waking up with the Sun and getting tired at what felt like a very early time of night. I think I've well and truly switched my chronotype to morning person at this point, and I'm not sure how to feel about it. As a former evening person, it feels like I'm now permanently jetlagged. I start getting tired after 9 PM, when before I would sometimes start creative projects (sometimes pretty hefty ones) at that time of evening due to being awake and alert and creative. Even if I'm up later than usual some night or don't have an alarm set the next day I can't really sleep in, forcing me to get to bed far too early from my point of view.

That said, I'm not entirely unhappy with it, nor am I in a huge hurry to change it. (Partly because it's not obvious to me how I would even go about doing so, since I don't understand the change in the first place.) It's useful for waking up for early morning meetings at Gemini, and I don't actually mind being awake soon after sunrise; I do enjoy the early morning feel, especially with how it's not ridiculously cold at that time of day here in Hawaii. From lockdown I got used to making breakfast at home rather than getting it somewhere on my way to the office, and this lets me enjoy a relatively leisurely breakfast before work. We'll see how it goes; perhaps old habits will reassert themselves over time and I'll shift back towards a later chronotype again, but for now I'll enjoy the post-dawn feel in the air when I wake up. A hui hou!

Sunday, May 2, 2021

Birthday month extravaganza

Back in 2019, some people (including a friend of mine from Swinburne) got together and created a website at a Python in Astronomy hackathon. This website, https://cakedays.space/, allows you to input your birthday (on Earth), and it will output a calendar which you can add to e.g. Google Calendar which will tell you when you'd have birthdays on each of the other planets in our solar system. It's quite a cute idea, and I've been meaning to write about it for a while now. I've finally gotten around to it because, while checking my calendar for this month, I discovered that I have four birthdays this month, one each week on all four of the terrestrial planets!

Hence the title of this post, as I'll be putting up a post on each birthday as it comes around this month. Not sure what I'll do for them yet. We'll find out…later this week. (Also, if you want to set up your own birthday calendar using the website, there are two boxes called “Skip Mercury/Venus Birthdays by” which skip as many as you specify. If you, like me, want to see every birthday, just put a 0 in those boxes. Putting a 1 would cause every other one to be shown, etc..)

On a more somber astronomically-related note, I saw that Michael Collins, the command module pilot for Apollo 11, passed away last week. As the guy who stayed in orbit, he's been called "the loneliest man in history" for his time spent on the far side of the Moon during each lunar orbit, out of radio contact with anyone. He himself described it as relaxing (which I can totally relate to as an introvert), and that he felt a mixture of emotions including "awareness, anticipation, satisfaction, confidence, almost exultation." A fond farewell to an oft-overlooked man whose presence was as integral to Apollo 11's mission as the other two.

Anyway, I'll end this post here, with the promise of several more to come this month. A hui hou!

Monday, January 11, 2021

Celebrating Ten…Er, Eleven Years of Daniel's Musings!

Today marks the eleventh anniversary of this blog. I know, I too am amazed—that I didn't think to make this post a year ago at the ten-year anniversay. To tell the truth, I actually wrote most of this post thinking it was the tenth anniversary. (And they're letting me do a PhD in astrophysics…) Anyway, a decade just over a decade ago when I started this blog, I was one semester into getting a bachelor's degree at UH Hilo, and now, I'm (hopefully!) just a few months away from finishing a PhD at Swinburne.

I originally started this blog as a way to replace email for letting a few people back home know how I was doing. Over the years it's morphed into something like a public journal, where I can show off things I've made or done, or talk about things that interest me for later reference. Some facts about things since this blog was started:

  1. I graduated with dual bachelor's degrees in physics (with a minor in mathematics) and astronomy.
  2. I've worked five different jobs (while my job description and day-to-day work with the JCMT remained exactly the same during the handover between owners, it was still technically two different jobs with different employers), including ones at high altitude on the two tallest volcanoes in the world.
  3. I started a PhD in astronomy, and am now just a few scant months away from completing it.
  4. I learned Python, my first programming language, and have been using it for…let's say about seven or eight years in total, to various degrees. (And last year I started seriously trying to learn Rust, which I might have a post on sooner or later.)
  5. I picked up a few hobbies:
    • Astrophotrography
    • Video editing/videography
    • Knitting (and re-started crochet after learning it a few years prior to beginning this blog)
    • Painting
    • Digital music engraving
  6. I created what is still, to date, the only video Let's Play of Dodge That Anvil!.
  7. And I've written a total of 668 posts for this blog, for an average of one every 5.47 days (though this is obviously skewed by the earlier years, as we shall see).

In some ways I'm impressed that this blog is still going. My interests are often somewhat…mercurial, shall we say, and tend to shift on the scale of a few years. I can never tell if some intense new interest will turn out to be a passing fancy of a few months or years' duration, or an enduring passion still going strong a decade later. As other interests of mine have fallen by the wayside over the past eleven years, this blog is still going, even if my output waxes and wanes over time. Originally I tried to write at least once a week; a few years ago, under the time pressures of full-time employment, I settled on just trying to have at least two posts a month (and even then I've fallen short a month or two!). I do still hold to the rule I originally established of “no more than one post per day,” though that hasn't been too difficult as I can either merge things together into one post, or have material for multiple posts. I put that in place to remind myself that this isn't social media (though it's perhaps the closest thing I have to it), and that I want posts that are worth reading rather than throw-away thoughts. (I've put up a few short posts that might've been mostly filler over the years, but not too many.)

Anyway, back in 2016 I wrote a little Python script to make a plot of my posts-per-month over time. (Amusingly, I've just discovered that that post, written on the blog's sixth anniversary, was intended for the fifth anniversary, so I guess I've started a tradition now.) I still had it lying around on my hard drive, so I've modernized it a bit, applied a few things I've learned in the intervening years, and changed it to plot each year as its own color:

The numbers after each month are the total number of posts in that month across all eleven years.

Here we can clearly see me start off the first three years with a pretty consistently high output, where even the slowest months have only been rarely been equaled since. In 2010 and 2011 I was still a student, and though I did take some pretty brutal workloads I obviously still had plenty of time on my hands for writing. (I'm sure the novelty factor helped a bit, too.) For almost the entirety of 2012 I was working at the Visitor Information Station on Mauna Kea, where I had full days at work and then several days off during the week, so likewise still had plenty of time (though being un- or under-employed for much of 2016 didn't really bring it back up). Looking at the line for 2013, you can almost see where I enter full time employment at the JCMT in January: it starts off pretty high at seven posts, but steadily nose-dives for the rest of the year, establishing the pattern that will generally be followed afterwards.

After the first three years, it looks like February is consistently a slow month, while May can be somewhat variable (probably because I often try to make at least one post around my birthday). Both June and July I've slipped up and only had one post in, while September through November are remarkably uniform at between two and four posts for the past eight years. And finally, December can be either pretty quiet, or one of the busiest months of the year; usually when I'm visiting family for Christmas I don't have much opportunity to write (the two years with six posts, 2017 and 2020, were ones I spent in Australia), but it's not a hard and fast rule as I didn't write any more posts than normal in 2018 when I didn't go anywhere.

Anyway, that's pretty much it. The colors used in the plot were taken from an excellent Python package for scientific plots, CMasher, created just in the past few years by a fellow PhD student here at Swinburne. I took the opportunity while making this plot to learn how to scrape HTML with the Beautiful Soup library, so instead of manually entering post counts (which is so 2016) my script now automatically scrapes them from the blog itself, which should make doing the inevitable sixteenth anniversary plot a bit easier. That's all for now, though I've definitely got a few ideas for posts for the coming weeks (and months. I should try to bump February's count up this year…) A hui hou! (Which I was also gratified to discover I've been using since the very first post ten eleven years ago.)

Thursday, December 31, 2020

Farewell to 2020

With less than four hours to go to 2021 as I type this, I wanted to cap off a turbulent year with one final post.

Where to begin? I have so much to be thankful for over the past 366 days. Just under a year ago, in early January, I flew through Shanghai airport on my way back from visiting family in California, just a few days after hearing about a new disease called “COVID-19” which was showing up in China. Thankfully I avoided catching it, either then or since. And while multiple members of my family caught it back in the U.S., they all survived more-or-less unscathed, a fortune not shared by millions of grieving people around the globe this year.

My PhD research has also thankfully been mostly unscathed by the tumult of transitioning to working from home from early March. Indeed, it's hard to imagine a more upset-resistant project than mine: my data is all archival (so I don't have to worry about observing runs being disrupted), I already had it all downloaded on a hard drive I can bring with me, and all my research happens on my university-provided laptop (so no worrying about the Swinburne supercomputer being down or having a faulty internet connection like many of my fellow students). I've continued to make slow but steady progress over the past ~9 months, and haven't had unavoidable delays like students in other fields who were doing lab work have. While the transition to working from home initially produced psychological stresses not unlike a house move (which was interesting to observe), once those wore off after a few weeks I've been quite happy not to be taking lengthy public transportation every day, and am probably going to continue working from home for the remainder of my PhD. (Which should hopefully be finished before the end of March.)

Sure, what I'm calling The Great Melbourne Lockdown was a bit rough. But I made it through with a guaranteed student stipend, the newly-discovered ability to order groceries online from my local grocery store, and the natural propensity of an introvert (or maybe just a hermit) to be at home when given the option. The winter was miserably cold, since keeping my room warm all the time in Melbourne's "What's insulation?" housing would've been prohibitively expensive with a space heater, but when, outside of the tropics, aren't winters miserable? (I'm channeling it towards motivation to find a job in the tropics again.) And on the plus side I didn't have to tramp a kilometer to and from the train station every day no matter the weather—on near-freezing rainy days I could time my daily walk with a break in the clouds, or even skip it altogether.

So on the whole, I really do have many things to be grateful for this past year. But what's on the horizon for 2021? 

Well, as mentioned, I hope to be finishing up my PhD and submitting my thesis by the end of March. Along the way I plan to submit two papers, containing the results of my three and a half years' of work. (I'm also contemplating a series of posts covering my research aimed at a layman audience now that the results are nearly done.) This is the time of year for astronomy jobs to be posted, so I'll be kicking the job hunt into high gear next week. It's no secret that I miss Hawaii and will be checking for jobs there, but who knows where things will go from here? I'll be looking for astronomy jobs first, but the skills I've learned from my PhD are quite broadly applicable; this year's put a lot of things into perspective for me, and I wouldn't mind potentially putting my skills to work in a medical field for a few years.

In the meantime, the prospect of summer is looming in the near future…probably. While we had some extremely hot days in late November presaging the approaching estival season, the weather here in Melbourne took a dip back to cooler temperatures for most of December. I've been wearing warm clothes and occasionally running the heater the past two weeks (including on Christmas) due to the antarctic cold fronts blowing up from the south lately. Now, as much as I dislike being cold, I can at least mitigate it with clothing and heating; cooling down from Melbourne's intensely hot summers (with nights that sometimes barely cool down) is a bit trickier, as the AC unit we got installed last year is out in the living room and doesn't really reach back to my bedroom. Supposedly we're in for a cooler and wetter summer due to a La Niña year in the Pacific, and I will happily take that over the more typical Melbournian summers I've endured the past few years. (I've also got a new gadget that might help out a bit with that, but I'll save a full discussion and review for a post early next year…)

As we approach anno Domini 2021, I'm feeling fairly upbeat. Yes, there are the multiple promising vaccines that will hopefully bring an end to the worst pandemic in a century; but I'm also really looking forward to finishing this PhD into which I've poured a tenth of my life and moving on to something different. Exactly what, I don't know yet, but that's the exciting part. I've been reading two books lately: Range: Why Generalists Triumph in a Specialized World, by David Epstein, and Late Bloomers: The Power of Patience in a World Obsessed with Early Achievement, by Rich Karlgaard. Range is a study about how many of the greatest breakthroughs and innovations throughout history have come from people who, contrary to the prevailing wisdom of specializing ever more deeply in a single subject, were broadly acquainted with many, allowing them to see and make connections their more specialized peers weren't equipped to. And Late Bloomers complements that by documenting many people who, despite society's push for us to be high-achievers by our 20's, bloomed and discovered new talents much later in life.

Range argues that instead of knowing exactly what we want to do for the rest of our lives before college, we are actually very ill-equipped to make that decision and should instead spend time during and after college trying various different jobs and experiences out for short periods of time, both to become more well-rounded and experienced and to have a better chance of discovering what exactly we want to do. Late Bloomers similarly advocates for patience in figuring out our path, due to full brain development demonstrably happening later in people these days (with a median age around 25, but even into late 20s or early 30s), and being open to the possibility of change and discovering new talents and interests throughout life.

Taken together, they've been very comforting to me. I've been secretly bothered for a long time by the way my brain doesn't really fit with the prevailing societal pressure to “pick something early and specialize in it forever.” My interests shift with the years, and I've held several jobs over the past decade rather than a single one. Range taught me to look upon my breadth of experience as an asset rather than a disadvantage, and Late Bloomers taught me not to fear the changes of time, or to worry about not already having changed the world or become a multi-millionaire. I've learned a lot over the course of my PhD; research methods, for sure, but I've also had time to become much more knowledgeable in Python (which will serve me well for any number of possible jobs) and I've discovered latent talents like painting and music scoring I never knew I had. I've learned that maybe research (or at least academia) isn't for me like I thought when I was younger, and I'm eager to try something new when I'm done with my PhD. Between it all, while I don't know what the future holds, I'm feeling more optimistic about it than I have for the past few years. And with that, here's to a Happy New Year 2021! Hau'oli Makahiki Hou!

Saturday, February 29, 2020

Fun with Python Decorators on February 29

Happy leap year, everyone. Despite having been writing this blog for a decade now, it turns out I didn't think to write a post on February 29 either of the previous two leap years it's been around for. So I'm rectifying that oversight this year! Of course, there's a purpose to this post beyond merely taking the opportunity of having one up on February 29 (though that was a motivating factor). This week I wrote some rather interesting Python code, and thought I'd share it.

I was working on some code to generate synthetic data sets to test various line-fitting code, and wanted a way to add some random noise to the output, but potentially using different functions to generate the noise, which might take their own variable number of parameters. I turned to the concept of decorators in Python, which are, essentially, functions which operate on other functions. For a mathematical analogy, consider the following situation: \[f(x)=g(h(x)).\] Here we have a function, g, which operates on another function \(h(x)\), and we define this resulting function as \(f(x)\). In Python, the function g would be a decorator, as it takes another function and returns a modified form of it.

Of course, we can extend this idea further; what if, in addition to a function, g also takes additional parameters? Perhaps something like \[f(x)=g(h(x), a, b, c).\] It turns out we can do this in Python as well, though it's somewhat abstract and I don't fully understand it. I read some tutorials on the subject, I guessed at how to extend what they said into code which works, but I'd be lying if I said I truly understood it at this point. Though I'll still take a stab at explaining it. The process involves a triply-nested function to handle passing arbitrary functions and arguments to the decorator. I've embedded the entire decorator function below:

 def add_noise(noise_func, *noise_args, **noise_kwargs):  
   """Add noise from a given function to the output of the decorated function.  
   Parameters  
   ----------  
   noise_func : callable  
       A function to add noise to a data set. Should take as input a 1-D array  
       (and optionally additional parameters) and return the same.  
   args, kwargs  
       Additional arguments passed to this decorator will be passed on through  
       to `noise_func`.  
   Returns  
   -------  
   callable  
       A decorated function which adds noise from the given `noise_func` to  
       its own output.  
   """  
   def decorator_noise(func):  
       @functools.wraps(func)  
       def wrapper_noise(*args, **kwargs):  
           # Create the values from the function wrapped:  
           y = func(*args, **kwargs)  
           # Now generate noise to add to those values from the noise function  
           # provided to the decorator:  
           noise = noise_func(y, *noise_args, **noise_kwargs)  
           return y + noise  
       return wrapper_noise  
   return decorator_noise  

The main action happens in the third function where the decorated function is used to create a set of data points, y, the given noise function is used to create a variable noise, and then y and noise are added together to give the output result. You can then use this decorator on a function at definition time like so (assuming you already have a function called gaussian which takes a single parameter sigma and does the appropriate calculations:

 @add_noise(gaussian, sigma=10)  
 def generate_line_1d(x, m, b):  
   ... code ...  

This would mean any time you called the generate_line_1d function its output would be modified by the addition of Gaussian noise drawn from a distribution with a standard deviation of 10. If you instead wanted to define multiple instances of generate_line_1d with, say, different values of the sigma parameter, you could do the following:

 gaussian_10 = add_noise(gaussian, sigma=10)(generate_line_1d)  
 gaussian_20 = add_noise(gaussian, sigma=20)(generate_line_1d)  
 ...  

And so on and so forth. These various returned functions would be analogous to the \(f(x)\) defined above. You could also switch out the gaussian function for another function, which could itself take an arbitrary number of arguments.

Looking at it now, it feels less useful in the specific context I'm using it in than it seemed when I was writing it, but I'm still proud of it—it's basically more flexible and abstract than I really need, but it's still a pretty neat trick of abstraction. Come the middle of this year I'll have been using Python for a decade now, and I'm still learning new tricks and features. And hey, I might not necessarily need it now, but you never know when it might come in handy down the road! A hui hou!

Tuesday, December 31, 2019

Goodbye to 2019!

In the closing hours of 2019 as we prepare to ring in the new year while I'm visiting my family in California, I thought I'd post two last pictures for the year:


The first is a little wooden box I painted back in January when my family visited me in Australia as a commemoration present. I actually didn't take a picture of it at the time so I hadn't seen it since January, and I found myself rather impressed with what I'd created almost a year ago with a much smaller selection of paints than I have now.  I'll take it over being embarrassed by my earlier efforts, anyway!


And for my dad for Christmas this year I found and painted this wooden plaque. I brought some red, yellow, blue, black, and white paint and some brushes with me from Australia and painted it here, which is why the color selection is a bit limited. I'm pretty happy with that green, anyway, for having mixed it myself.

Anyway, a Merry Christmas to you, and may you have a wonderful 2020! Hauʻoli Makahiki Hou!

Sunday, December 30, 2018

Happy 2019! Hauʻoli Makahiki Hou!

Well here it is, 2018's just about over and 2019's just around the corner. A year spent in Australia, a year spent below the equator—and now that I'm west of the international date line instead of east I get to welcome the new year before most of the world instead of after it. (Which means this post is going to go up the day before for people in the U.S. Oh well. That's time zones for you.)

And I'm off to a New Year's party now, so see you all in 2019! Hauʻoli Makahiki Hou!

Wednesday, May 16, 2018

Family Roots

Another year, another birthday. And what an eventful year it's been! This time last year I was still working at the YTLA in Hawaii (and I'm pretty sure I got to observe on my birthday night) and working through the application process at Swinburne.

Back around the end of April I heard from my mother about some genealogical research my aunt had been doing which I found quite fascinating, so as I ponder another year lived I thought I'd share some of these family roots for posterity.

According to the Mayflower Society, it turns out that on my mom's side I'm descended from several of the passengers who came over to North America on the Mayflower in 1620, specifically John Alden and Priscilla Mullins (who were married a year after arriving, in 1621). While reading about them I discovered that the famous American poet Henry Wadsworth Longfellow was also descended from them, making us distantly related. And then I discovered that he wrote a famous epic poem in dactylic hexameter about them called The Courtship of Miles Standish! (You can read it here.) It's about a love triangle between John Alden, Priscilla Mullins, and the eponymous Miles Standish, and how (spoilers) John and Priscilla eventually end up married. It's unknown if it's historically accurate or not; Longfellow always maintained that it was a retelling of oral history passed down through the family, though at the very least he likely made use of some poetic license by compressing several years of events down. It's a good poem, if really, really weird knowing it's about my ancestors. (I already know how it ends, or else I wouldn't be here! Talk about spoilers!)

According to my aunt's research we're also descended from William Brewster and his wife Mary, more Mayflower Pilgrims, though she forgot to get it checked by the Mayflower Society at the same time. (Edit 5/26/18: She got back to me that they were able to confirm this as well, with the additional information that I'm fifteen generations removed.) While researching them and William's rather exciting life I discovered there's a style of furniture called a Brewster Chair, named after a particular chair created for and owned by him. Even more incredibly, the actual chair owned by my ancestor is still around in the Pilgrim Hall Museum, and you can see a picture of it below!

Original Brewster chair (left, public domain photo).
As I reflect on all this information this year there are a lot of emotions to process. As I reside here in Australia, it's encouraging to think that my family's been crossing oceans to make new lives for themselves on the strength of their religious convictions for centuries. And knowing that my ancestors were present for the first Thanksgiving in 1621 has given the holiday new meaning for me; I think come 2021 I'll make a point to celebrate it with the tagline “A family tradition for 400 years!” A hui hou!

Wednesday, January 1, 2014

Ka Makahiki ʻElua Kaukani ʻUmikūmāhā

That's Hawaiian for “the year two-thousand fourteen.” I'm back safe and sound, enjoying the warmth and humidity again. Despite living here for four and a half years, this is the first New Year's Eve I've actually spent in Hawaiʻi. People celebrate the New Year here with firecrackers.

Lots and lots of firecrackers.

It's been reminiscent of a warzone here for the past two days with explosions loud and soft ringing out every few minutes, the acrid tang of gunpowder wafting about on the convenient breeze, but it seems to finally be quieting down a bit now. Thankfully I was so tired last night from traveling I slept straight through the night. Anyway, I need to go finish unpacking. A hui hou!

Sunday, June 30, 2013

Science Clock Series: Part III

Today we turn to the field of cosmology for our number, which happens to be three, and is given by:

\[\approx\ \text{background radiation of space (K)}\] The “background radiation of space” refers to the Cosmic Microwave Background Radiation, usually abbreviated “CMBR,” or just “CMB.” The CMBR is a diffuse ocean of electromagnetic radiation which pervades space evenly from every direction and which has its peak energy in the microwave portion of the spectrum. It has an almost uniformly frigid temperature of \(2.72548\pm0.00057\) K (about \(-270.42^\circ\)C, or \(-454.76^\circ\)F).

Because the CMBR pervades all of space, as far as we can tell, it defines the coldest temperature you can find naturally in the universe (at the current epoch). This is what people usually have in mind when they think about the temperature of space. If you were to travel to the intergalactic void in the incomprehensibly large bubbles of empty space between the faintly glimmering gossamer filaments of galaxy clusters, far away from any stars or sources of heat, this is the temperature you would measure. That's what I mean when I say that the SCUBA-2 instrument on the James Clerk Maxwell Telescope is currently the coldest place in the known universe, because its sensor arrays operate at a temperature of a mere \(0.07\) K (about \(-273.08^\circ\)C or \(-459.54^\circ\)F), 70 millikelvin above absolute zero.

Now, although the CMBR is incredibly uniform in all direction, it's not perfectly uniform. It is, however, pretty close, having no variations larger than 1 part in 10,000. For comparison, according to the regulations of the World Pool-Billiard Assocation, pool balls need only be smooth to 1 part in 500. To put that in perspective, the CMBR is twenty times smoother than a pool ball.

Analysis of the variations in the CMBR is a very active area in cosmology. In the last 24 years there have been no fewer than three satellites (COBE, WMAP, and Planck) dedicated to measuring and mapping the minute variations found across the sky in the CMBR. On a more personal note, it also holds a bit of a special place in my heart because it's partly responsible for me going into astrophysics.

You see, I've always been interested in astronomy as long as I can remember, but when I was young I was interested only in the planets and moons of our Solar System. Stars, galaxies, and the wider universe held no interest for me. It wasn't until I came across a book on cosmology sometime around the age of eleven that I became interested in the universe in general.

You see, any modern theory of cosmology needs to explain the existence of the CMBR. It is generally taken as evidence of the Big Bang theory of the universe's formation, and is explained as light from diffuse, homogeneous clouds of (primarily) hydrogen from early in the universe's history that has been highly redshifted over time by the expansion of the universe down to the energies found today. It is extremely difficult (if not impossible) to explain in the Steady State model of the universe (a competing theory during the early 20th century which was generally considered to be dis-proven upon the discovery of the CMBR), and is generally taken as proof of a finite age (and thus a beginning) of the universe.

There are, however, some problems with this particular interpretation. For one, the CMBR is too smooth; for it to be as smooth as it is today in the Big Bang theory, it would have required various parts of it to exchange heat energy between themselves and equalize their temperatures. However, if we pick two areas of the sky on opposites sides from us, there hasn't been time for them to have exchanged energy. This led to the postulation of inflation, a period of greatly-accelerated expansion of the universe, providing time beforehand for everything to equalize; however, there has yet to be any concrete evidence for such a period of rapid expansion. There's also the problem of galaxy clusters not casting as much of a “shadow” on the CMBR through the Sunyaev-Zel’dovich effect as they should, on average, and the anomalously weak quadrupole moment in the distribution of variations in the CMBR.

The point of the above is not necessarily to show that the Big Bang theory is wrong, per se, merely to point out that there remain unsolved problems with it (as there do in pretty much every area of science. It wouldn't be the “search for knowledge” if we already knew everything, would it?). As scientists we must always keep in mind the possibility that there may exist alternatives that fit the data as well or better, and it would be prudent to keep an open mind.

I encountered one such alternative as a young lad in the previously-mentioned book Starlight and Time, by Russell Humphreys, which contained an alternate cosmological theory consistent with the book of Genesis, General Relativity, and everything known about the CMBR up to 1994 when it was published. I remember that as a child the equations of General Relativity scattered liberally throughout the text were incomprehensible to me – I'm not sure I had even begun algebra at that point – but the accompanying text explained fascinating concepts like time dilation, gravitational red-shifts, and the expansion of the universe in language that I could grasp. It was, in all honesty, a pivotal point in my life. I was hooked on physics, and knew that, someday, I too wanted to spend my life studying the fundamental mysteries of the universe.

(If you're curious, in Humphrey's theory the CMBR is the primeval light created on the first day of creation, just stretched and red-shifted into the microwave region. If you're curious and not afraid of math [though as mentioned the writing stands on its own], you can find the book on Amazon.com, as I discovered while writing this post. I never owned a copy myself and it's been years since I read it, so I now have the Kindle edition to look forward to re-reading on my phone.)

Anyway, you now know what the cosmic microwave background is, and that where it comes from depends on your starting assumptions. Regardless, it's a fascinating topic and I could say a lot more about it, but this post is long enough already. Tune in next time for a very important number from biology! Click here to jump directly to it.

Tuesday, June 18, 2013

Science Clock Series: Part I

For Christmas my parents got me a novelty clock with scientific references for the numbers which I put up in my office. It's a nice clock, although this was the best picture I could get of it:


Now, since there are a lot of different scientific references on this clock I decided to write a mini-series on them, each post focusing on one of the numbers. Although I'm familiar with nearly all of them there are a few that I myself need to look up, so it'll be a learning experience for me as well. I'll be explaining as many of the scientific concepts that come up as I can for those who aren't familiar with them.

Today I'm going to start with number one:

\[\rho\ \text{of}\ \text{H}_2\text{O}\ (\text{g/cm}^3\ \text{at}\ 4^\circ\text{C})\] The Greek lower-case letter \(\rho\) (rho) is traditionally used to represent density in chemistry; H\(_2\)O is water, made up of two hydrogen atoms and one oxygen atom. The g/cm\(^3\) notation means grams per cubic centimeter, so the whole expression means “the density of water in grams per cubic centimeter at four degrees Celsius,” which refers to one.

Why it equals one is rather interesting. Fundamentally it equals one by definition; water is such an important and ubiquitous substance (it makes up 65-70% of the human body, covers 70% of the Earth's surface, etc.) that it was chosen such that the mass of one cubic centimeter of water was equal to one gram (or equivalently one gram of water occupies one cubic centimeter), so that the density of water is exactly one by definition. Thus, you can immediately tell if a substance is more or less dense than water at a glance by seeing whether its density is greater or less than one. If a substance's density is less than water it will float in water; if greater, it will sink. Sodium, for example, has a density of 0.968 g/cm\(^3\), or 96.8% that of water, meaning that sodium will just float on water. (Or at least, it would if it wasn't reacting so incredibly fast with water to produce hydrogen and igniting it in powerful explosions.) Magnesium, with an atomic number merely one higher than sodium, has a density of 1.738 g/cm\(^3\), 70.38% more dense than water, so magnesium would sink in water.

However, there's a wrinkle with this whole scenario that the critically-minded among you may have been wondering about: it turns out that the density of a substance varies with temperature. For most substances, the density decreases as the substance gets hotter, and increases as it gets colder. The reason for this is that greater temperature means greater average energy on the molecular level, which translates into higher average molecular speed, which tends to lead to increased molecular spacing and thus the same amount of mass taking a slightly larger area. Typically the changes in density are fairly small for liquids and solids, larger for gases.

As I mentioned, most substances increase in density as the temperature decreases, and this is mostly true for water; however, it has a slight hiccup as it approaches its freezing point. Rather than decreasing monotonically as the temperature decreases to 0\(^\circ\)C, the density of water reaches a minimum at 4\(^\circ\)C, then begins to increase slightly as it approaches its freezing point.

This behavior is unusual, thought not entirely unique; there are a few other substances that display similar quirks. However, in water's case, this little quirk is quite important for life on Earth. Because of this quirk, ice floats on liquid water, which is highly unusual (most solid substances sink in their liquid forms). Ice is a pretty good insulator, so ice forming on the surface of lakes helps keep the water beneath it from freezing more, leaving liquid regions underneath throughout the winter where fish and other creatures can survive. And when spring comes, the ice floats on the surface of the water where it can be melted by the Sun, rather than sitting out of reach on the bottom of lakes and rivers.

This quirk of density is but one of the many ways water is a very unique substance (one reason it was chosen to define density), but that isn't the focus of this post which is already getting a bit long. Next time we'll take a look at something from nuclear physics! Click here to jump directly to it.

Sunday, May 5, 2013

Moons and Months

It's probably not a big surprise to most of you to learn that the words for "moon" and "month" are related in English (and some other languages as well). Our Moon's orbital period of 27 days, 7 hours, and 41.1 minutes comes very close to the number of days you get when you divide the Earth's orbital period by twelve, and makes a nice natural division of time.

But have you ever thought about the moons of other planets? For example Mars' two moons, Phobos and Deimos, orbit their parent planet in just 7 hours 40 minutes and 30.3 hours respectively. Many of Jupiter and Saturn's close-in moons likewise orbit in less than an Earth day. In fact, there are dozens of moons with a shorter orbital period than our Moon.

On the flip side of the scale, there are also dozens of moons with longer orbital periods than our Moon. Jupiter and Saturn both also have lots of small, irregular moons that orbit far from their parent body, which can take months or even years to complete one orbit. Saturn's moon Phoebe, for instance, takes 550.3 days to make a complete circuit, nearly two Earth years. Prior to last week, I knew of a few Jovian moons with orbital periods measured in days in the 600's and 700's. Given Jupiter's humongous mass, you'd expect that it would be able to hold onto satellites further out than other planets, which would have correspondingly long orbital periods.

So you can imagine my surprise when I, on a whim, looked up the satellite with the longest orbital period and discovered it belonged to...Neptune?? And not just by a few days or even a few months – we're talking years here.

In fact, it turns out the four longest orbital-period moons all belong to Neptune. The two inner ones, Sao and Laomedia, have orbital periods of 7.97 and 8.68 years respectively. The two outer ones, Psamathe and Neso, take 24.84 and 26.67 years to orbit Neptune once, respectively.

I found this revelation absolutely mind-boggling. Neither of these moons has completed an orbit since I've been born. They have longer orbital periods than the first five inner planets. They orbit Neptune at a mean distance of around 48-49 billion kilometers (about 30 million miles), which is nearly a third of the distance from the Earth to Sun. At its furthest point, Neso can be further from Neptune than Mercury ever gets from the Sun!

If you wondered, like me, how Neptune and not Jupiter can have the furthest-out and longest-orbiting satellites, it has to do with something called the Hill sphere (named after 19th-century American astronomer and mathematician George William Hill). The Hill sphere is basically the region of space in which an object's gravitational pull dominates the attraction from other objects in the region. For a moon to remain in orbit about a planet, it must remain entirely inside the planet's Hill sphere, or it will eventually be pulled loose by the gravitational perturbations of other planets. This limits how long of an orbital period a moon (or other satellite) can have before it is no longer stably bound to its parent planet. For instance, the mathematics suggests that it is impossible for the Earth to have a satellite with an orbital period of longer than about seven months.

To get to the point, a planet's Hill sphere depends both on its mass, and its distance from the Sun (and other massive sources of gravitational perturbation). Jupiter, of course, is many times more massive than Neptune (and all the other planets combined), but Neptune is several times further from the Sun. Add in the inverse-square nature of gravity, and Neptune manages to eke out a victory in the "largest planetary Hill sphere" competition. (Interestingly, of the four outer planets, Jupiter has the smallest Hill sphere; it increases slightly but steadily in size from Jupiter through Saturn and Uranus on to Neptune. Turns out increased distance from the Sun is more important than decreasing mass.) Neso and Psamathe are orbiting nearly at the outer limit of Neptune's Hill sphere, so they are likely to remain the moons with the longest orbital periods for the foreseeable future.

Of course, they were only discovered in 2002 and 2003, respectively, so who knows what else could be out there! It's an exciting time for us lovers of planetary science and Solar System dynamics.

Anyway, I hope you found that as interesting as I did. If you're interested in other comparisons between the moons of the Solar System, this page on Wikipedia has a nice table that you can sort by various categories.

Tuesday, January 8, 2013

New Year's Flu

First of all, I'd like to apologize for the last week of silence here on my blog, it turns out that the flu tends to drain you of all energy, motivation, and desire to do pretty much anything. Over New Years my family went to Florida for a few days, where we visited Disney World, the Cape Canaveral Lauch Pad, and the Capitol One Bowl. Somewhere along the line I picked up the flu, from which I am finally feeling recovered enough to be able to write this post.

Recovered enough to write this post, but not much more yet. I hope to be up and running with some more posts in the not-too-distant future though. A hui hou!

Monday, December 31, 2012

Pau ʻo ka makahiki ʻelua-kaukani-ʻumikūmālua! 2012 is done!

Since, as you can see if you are reading this, the world did not end on December 21st, we can see that the end of the latest b'ak'tun in the Mayan calendar did not signal the end of the world any more than the ending of our calendar on December 31st does. The Mayan calculators simply had to pick a cut-off point for their future calendar predictions, and considering they chose one several hundred years past the point where their culture was actually really using it, I'd say they did a pretty good job. Sure, in these days of electronic computers it's trivial to extend the Gregorian calendar forward arbitrarily far in time, but in those days when all calculations were done by hand there comes a point where you just have to call it quits.

Anyway, happy New Year, everyone, I'll see you in 2013!

Sunday, June 10, 2012

Transit of Venus Redux

Well, the transit of Venus came and went, and I survived. I wasn't entirely sure I would with all the stress building up to it, but here I am. I've been quite fortunate in getting four days off in a row to recuperate, and I felt rested enough by the third day to finally make myself the belated birthday cake that I've been meaning to do for two weeks now.

I also recovered enough of my creative drive to put together this collage from pictures I took with my camera through one of our 14-inch scopes. This picture was taken around 3:37 in the afternoon, and you can clearly see Venus as the round dot and a couple of sunspots as the irregular faint black spots.

Transit of Venus, June 5, 2012.

It's kind of strange to consider, but this is now a rather historic picture. I can't really say that I've ever done anything historic before. Making some assumptions about the future, it's possible that someone over a hundred years from now could find this picture while researching ancient coverage of previous transits of Venus. Kinda makes you stop and think, doesn't it?

To paraphrase a famous quote from the previous pair of transits, “And what will be the state of science in that far distant future when the December snows are falling in 2117, God only knows.”