In honor of the impending start of the academic year, here is the pdf of my LaTeX workshop.
A New Route to Phase-Resolved Spectroscopy of Pulsations and QPOs in X-ray Binaries
The accretion disks in neutron star and stellar-mass black hole X-ray binaries provide an opportunity to study matter in strong gravitational fields. In particular, using spectral-timing measurements of X-ray emission, we can analyze the inner parts of the accretion disk and corona. Here we present the application of a new spectral-timing technique to carry out phase-resolved spectroscopy of rapid periodic and quasi-periodic signals from X-ray binaries. This technique measures relative phase and does not require ephemerides or exactly periodic signals, so it is applicable to a wide range of data, from X-ray millisecond pulsations to kHz and low-frequency QPOs. The method gives new insight into the physical mechanisms underlying these signals as well as the geometry of the emitting regions.
This is my go-to list of fun things to do and see when family and friends visited me in Amsterdam, Netherlands! I compiled this from suggestions from friends, colleagues, and travel guides; I haven’t done everything on the list, but I made a valiant effort. It’s Amsterdam-based/focused, since that’s where I lived. Things with an asterisk are must-do’s!
These are accessible within Amsterdam, and typically some can be combined in one day. Look into buying a museumkaart – many of the museums in Holland are free with one.
– * Albert Cuypmarkt or Dappermarkt (open air markets) for fresh stroopwafels
– Amsterdamse Bos (nice for a picnic in the summer! requires cycling to get there)(visit the goat farm, cherry blossom park, and Scottish Highlander cows)
– * Anne Frank house (you absolutely should buy tickets in advance to avoid the long queue; book ASAP!!; the self-guided tour is about 1 hour)
– Bloemenmarkt (the flower market – pretty quick)
– * Canal cruise (this one is pretty good — I recommend going at dusk!)
– Cheese tasting (we did this one at Reypenaer and loved it; book in advance!)
– Dam square (very quick)
– * Eat an Indonesian rijsttafel (places I’ve liked: Desa, Sampurna, and Kantjil & the Tiger)
– Heineken Experience (a tour through the old Heineken brewery with demonstrations on how they make Heineken beer; book tickets in advance, since the line gets long)
– Hermitage Amsterdam (art museum with a rotating exhibit, so check before going)
– Hortis botanical gardens (best in the spring and summer)
– Kalverstraat shopping
– Oude Kerk (oldest building in Amsterdam — founded in 1213!)
– * Parks – Vondelpark, Oosterpark, Amstelpark, Frankendael, etc. (Distilleerderij ‘t Nieuw Diep is a little cafe in Flevopark; there’s also a teahouse in Vondelpark)
– Rembrandtplein (cool statues, and lots of clubs/nightlife)
– * Rijksmuseum: classic huge art museum with lots of stuff to see! The building itself is also gorgeous. I recommend starting at the top floor (in the “hall of greats”) and working your way down.
– Tassenmuseum (Museum of Bags and Purses, dating back to the middle ages!)
– Tropenmuseum (anthropological museum with many traces of Dutch colonialism/imperialism)
– * Walk through the Jordaan canal district and old city center. Rick Steves has a free audioguide for walking around this neighbourhood. (Navigational note: the city is laid out in polar coordinates, not Cartesian; watch your step on the cobblestones and curbs, and always check for bicycles before crossing!!)
Other places in Amsterdam for food: Winkel43 for Dutch apple pie, La Falote for classic Dutch food, Upstairs Pannekoekenhuis for Dutch-style pancakes (like crepes, but with the toppings cooked into the batter; also available at *many* other cafes), La Vallade for fancy upscale European food, Albina restaurant for Surinamese food, Le Petit Latin for French food, Ponte Arcari for Italian food, Taytu Restaurant for Ethiopian food, India Roti Room for Indian food
Other places in Amsterdam for drinks: Gollem Raamsteeg or Gollem Daniel Stalpertstraat for Dutch and Belgian beers, Brouwerij ‘t IJ for local Dutch beers, Wynand Fockink for liqueurs and jenevers (like gin), Whiskycafe L&B for whiskeys, Mulligan’s Irish Pub for Irish beers and live music
Nearby in/near Noord-Holland
Close enough to Amsterdam that they can be a morning or afternoon trip (generally within the province of Noord-Holland). Tip: Use 9292 to plan train and other public transit journeys in the Netherlands, and load up an ‘anonymous’ ov-chipkaart to easily tap in and tap out of public transit!
– Aalsmeer flower auction
– Gouda or Alkmaar cheese markets (go for the full historical thing)
– Haarlem (they have a nice Saturday morning market in the old town square)
– * Keukenhof tulip fields (best in April, when the tulips are in bloom; if you’re feeling cheap or tired and just want a glimpse, take the train between Leiden and Heemstede-Aerdenhout, and you’ll pass by some great fields; cycle through the tulip fields with my route!)
– Zaanse Schans windmills & historic town
– Zandvoort aan Zee (the beach!)
Elsewhere in the Netherlands
These require a full day or more. I really enjoy purchasing a map in the tourism info booth for a self-guided walking tour through the town!
– * Delft (market in the old square, Nieuwe Kerk, Oude Kerk)
– Den Haag (Mauritshuis, Gemeentemuseum, Scheveningen beach (cycle along the dunes!))
– Maastricht, caves in Valkenburg aan de Geul, and the 3-country point (will probably need to rent a car once you reach Maastricht, and likely requires an overnight stay in the area)
– Rotterdam, Maeslantkering storm surge barrier, Kinderdijk windmills, boat trip around the Randstad
What would you add to the list? Are you planning to swing through the Netherlands on your next trip?
My undergraduate mentor in the math department, Prof. Greg Landweber, taught me his 10 coding principles in a computational methods tutorial. They’ve gotten me through my BA project, MSc thesis, and I’m still using them in my PhD. They are as follows:
- BE FEARLESS.
- Compile early and often.
- Consult the documentation (RTFM).
- Use descriptive variable names.
- Comment liberally, including every function, its parameters, and return value.
- User interface should be at the top-level only. Computational functions don’t talk to the user.
- Use print statements to debug.
- No global variables.
- Organize your code into functions. Avoid repetition.
- Think about algorithms. Avoid checking every possibility by brute force.
Number 1 is my favourite. Number 10 is still something I’m working on. I forced myself to use these principles when I was learning to code, and I think they make me a better programmer than I’d be without having learned and used them. One idea I would add, which is a principle of both good coding practice and laziness:
- 11. If you’re manually doing a task often, automate it. You will be rewarded handsomely for your effort up-front.
What are your coding principles?
EDIT: This post generated some great discussions! Here are some suggestions and addenda from my friends and colleagues:
3a. Write documentation in the first place, and update it as the code grows and changes.
11a. If you have to do it twice, automate it!
12. Think before you code. (As it was pointed out, “think before you X” is a good rule of thumb for life.)
13. Use assertions to debug.
14. Use version control (e.g. Git).
14a. Never commit broken code.
15. Avoid archaic languages (fortran, IDL) whenever possible.
16. If any code unit has more than ~50 lines (pick a relevant threshold), it needs to be split into separate units.
17. Write test cases for your code.
18. Just because you’ve found a bug doesn’t mean you’ve found all the bugs and your code works now.
19. Don’t just be prepared for failure, expect it! There will be a problem with the code you’re writing right now, but you’ll be able to fix it eventually!