Category Archives: Uncategorized

Meal Extraordinaire of the Week: man-burgers!

It’s been a long time since my last entry; I’ve been busy doing research and watching Starcraft 2. This past weekend, there were too many tournaments for me to watch; however, my post here is about food. I will leave explaining competitive SC2 for another time.

I’ve been wanting to get a cast iron pan for a while now since I cannot have charcoal or butane grills in my apartment; I’ve read that cast iron skillets are great to cook meats. On Sunday, after being a great boyfriend and installing K’s AC, I finally caved in and bought a beautiful 10-inch pan. Right after doing that that, I decided to make hamburgers and quickly went to the butcher shop to get the necessary ingredients: ground sirloin, lettuce, tomato, good quality buns, and cheddar cheese.

Once I got home, I took everything out and started to work. Luckily, the pan I bought was pre-seasoned, so there was no need to spend time on anything else but the burger. While I preheated the pan in the oven at 350 F, I caramelized some onion rings by cooking the onion in a mixture of sugar and butter; in addition, I toasted the bread on the same pan I used for the onions and prepared the lettuce and tomato slice with only some salt. Once the pan was ready, I added a little bit of olive oil to it and put the seasoned 8 oz patty to cook. I don’t have the language proficiency in my mother tongue, let alone in English, to convey how delicious my kitchen smelled when the meat was being cooked. I flipped the burger after 3.5 minutes and added some butter to the top of the patty. After cooking the other side for 4 minutes, I put the cheese on top and let it melt. I took some pictures of the process as well as the finished product (shown below).

Lettuce, tomato, and onions:

Cooking the patty while keeping the bread warm in the back

Adding butter to the patty

My first try was a failure because the burger was completely raw inside; therefore, I learned that in order to get a properly cooked burger, I needed to make a thinner patty. On the second time, the hamburger came out juicy and a little red inside, just how I like it! Once it was ready, I made some iced tea and watch the finals of one of the SC2 tournaments I mentioned in the beginning. What a great Sunday!


Meal Extraordinaire of the Week: Lemon Cream pie!

This week, I craved for something sweet and delicious. As usual, I browsed Mel’s blog and found plenty of potentially awesome recipes to try. As my mouth watered, I did a lot of thinking and narrowed the list to five possible desserts:

  • Robert Redford Dessert. Don’t ask me where the name comes from; I just know that it looks and sounds delicious.
  • Tiramisu. I can’t remember at what age I started liking tiramisu, but who cares? Everyone knows that eating a well-made tiramisu can be an exquisite experience.
  • Chocoflan. I like chocolate; I like flan. What could possibly be better than both?
  • Coconut tres leches. Tres leches (and cuatro leches as well) has always been one of my weaknesses. I will do many things for you in exchange for some of this milky delicacy.
  • Lemon pie. When I Was a kid, this was my favorite dessert, so making it puts me in a nostalgic mood.

As you can see, I have somewhat of a sweet tooth; I have loved desserts my entire life. As a child, I used to say that my stomach was divided in multiple sections, of which the largest one corresponded to desserts. That way, even if I said I was full in order to not eat any more vegetables, I could still eat desserts.

To make my decision, I weighted the recipe complexity as well as the amount of ingredients I would have had to buy. Due to its simplicity, the lemon pie recipe was the winner. Like I mentioned before, eating lemon pie brings back some great childhood memories. When I was around 10 years old, my step-dad, my mom, and I came to the US for vacation. The trip was extremely busy; we stayed a couple of days in Miami and drove around multiple places including Key West; then, we flew to Las Vegas and rented a car to visit the Great Canyon and the Red rock canyon as well. Oftentimes, my mom would drive, my stepfather would sleep, and I would be sitting as the copilot. Whenever this happened, my mom would stop by a diner or a small restaurant on the road, and we would both go inside, leaving my stepfather fast asleep in the car; I would order a lemon pie and she would get something else, laughing at how sneaky we were. We had so much fun1. I miss them both greatly.

What a great trip down memory lane, but let’s get back to the cooking. Here are some pictures of the dessert without the whipped topping:
Pie out of the oven
and with the topping:

Pie with the creamy topping
Pie with the creamy topping

I was ecstatic with the result. There was enough lemon juice to make the filling refreshing, perfectly complementing the overwhelming sweetness of condensed milk. I will need a great deal of willpower to restrain myself from eating it all :).

[1] Not all of it was laughter. There was what we now call “The William’s Incident.” As we were driving towards the Great Canyon, we had to pass by a town called Williams. For some unknown reason, I was obsessed with going to Flagstaff, a small city nearby; I kept being annoying by repeatedly asking if we could stop on Flagstaff. My stepdad finally got sick of it, grabbed the map we were using, and hit me on the head with it; outraged, I didn’t speak again until we got to Williams. It was pretty hilarious.

On Keeping an Organized e-Library

A few months ago, I had around 600 journal articles and 100 books scattered throughout multiple folders in my computer. The pdfs were named with the last name of the most relevant author and some arbitrarily chosen keywords from the title. It goes without saying that looking for relevant information in this mess I called library was a painful process. Even deciding where to place a given pdf was difficult as the contents could be related to multiple, somewhat independent topics; for instance, a paper on classifying EEG signals for brain computer interfaces could easily be put under a machine learning, signal processing, or BCI folder. Once a paper was added to my library folder, I would rarely revisit it again; in fact, it was easier sometimes to just google some keywords to find the paper again.

One day, my coworker M introduced me to Mendeley, a program he used to maintain an organized paper library. I knew that software tools for this type of problem existed, but I never bothered to try some of them to find the best fit. In previous years, I had used Zotero to assemble a Bibtex bibliography file from some pdfs; I even tried to use it for general file organization during my last co-op, but I stopped out of laziness since adding papers from the browser was a little tedious. At first, I was skeptical, but after seeing M’s workflow and trying it on my own, I have to say that Mendeley changed the way I work for the better; good-bye poorly name papers inside messy folder structures!

I use Mendeley for mainly three tasks:

  1. Automatically rename papers at download time
  2. Organize papers by topic, field, project, etc
  3. Share reading lists among individuals or groups I work with

These features come in handy at work. At my lab, we have a reading requirement of 2-5 papers per week, which can be a little daunting at first; however, with Mendeley, adding and organizing papers in my library is fairly straightforward. By keeping all of my papers in a single Dropbox folder that is managed by Mendeley, I can even read my books/articles on my tablet! Android has an app called Referey that uses the database file from Mendeley to link the document entries to their respective pdfs stored in the tablet. Setting up both Mendeley and Referey is not complicated; the steps are outlined below.

Setting Mendeley to automatically rename files for you

Unfortunately, publishers name articles following an arbitrary and obscure notation; for instance, IEEE Xplore named a paper on single trial EEG classification as “06739167.pdf”. Even worse, none of the publishers agree on a common naming format. Mendeley solves this issue by automatically extracting relevant metadata from files and renaming according to standardized convention. To do this (assuming you don’t already have a Mendeley account):

  1. Create a Mendeley account at
  2. Download and install the desktop application
  3. Open your new Mendeley application and sign in using your credentials
  4. Go to Tools and then Options
  5. Go to the File Organizer tab and check the following options:
    • Organize my files. Browse to a folder where you want to keep your papers
    • Rename document files. Use the “author – paper – year” format
  6. Go to the Watched Folder tab
  7. Select the same folder from step 5.a
  8. Click on Apply and Ok

Now, whenever you download a new paper, put it in the watched folder. Mendeley will attempt to extract the metadata from the pdf and will rename it accordingly. If by any reason this fails, you can manually edit the metadata and Mendeley will rename the file for you once you are done. The metadata can be accessed on the right pane of Mendeley when you select the paper in the browser.

Organizing papers:

Mendeley has two main ways to keep your papers organized: tags and subfolders. I believe that tags are superior since papers can have multiple tags but can only belong to a single folder. For example, a SSVEP classification paper could be tagged as “BCI”, “SSVEP”, and “Machine Learning.” Here is how you do the tagging:

  1. Select the paper in the Mendeley browser
  2. In the right pane, click on the Tags textbox
  3. Type the tag name you want. If it already exist, an autocomplete box will appear
  4. Separate tags with a semicolon

To search for papers with multiple tags, use the Filter by My tags on the panel on your lower left and ctrl+click on the desired tags. Alternatively, you can use the search box by typing “tag: tagname” multiple times.

Sharing reading lists with your coworkers

You can share your new downloaded papers with your coworkers by sending the citation details as an email or as group contribution

  • Sending paper details as an email:
    1. Right click on the paper entry in the Mendeley paper browser
    2. Select send as email
    3. Fill in the details and send it
  • Contributing paper to a group assuming you have been invited to it already:
    1. Select the papers you want to share
    2. Drag and drop them on the group (located on the Groups section in the left top panel)
    3. Click on the Sync button
  • If you want to add papers from a group
    1. Go to the group page (click on group name located on the Groups section in the left top panel)
    2. Drag and drop the paper to your library
    3. Since the pdf is not shared, they may have to search for it themselves. You could always have a shared folder somewhere as well.
    4. Mendeley will automatically link the citation from step 1 to the new pdf added. If not click “tools > check for duplicates”
    5. You may have to manually edit the documents metadata if the extraction and linking fails

You can share your notes and highlights only if they were added in the group entry of the document; the annotations won’t sync if you added them to your personal document entry. This makes sense to me because I may jot down some notes that may unnecessarily clutter the paper for the rest of the group.

Setting up Referey:

Referey is an Android app that uses the Mendeley database file to pair the pdfs stored in the tablet with the respective document entries; this assumes that the pdfs are named the same both in your desktop and in your table (not a problem with Dropbox)

  1. Synchronize your libary folder with your tablet. I use Dropsync for this
  2. Find the Mendeley database file in: C:\Users\user\AppData\Local\Mendeley Ltd\Mendeley Desktop. It should be a file with this format:
  3. Copy the file to your tablet. I do this with a Windows task scheduled nightly that copies this file to a Dropbox folder
  4. In the Referey app, set the database path to the full location of the file you just copied. It should be something like: /storage/sdcard0/…
  5. In addition, set the PDF folder path to the location of your pdfs. It should be something like: /storage/sdcard0/…

If everything is set up correctly, you should now be able to browse your pdf library from Referey.

Meal Extraordinaire of the Week: Lasagna!

To add non-engineering related activities to my life, I have decided to cook (or grill, bake, etc … you know what I mean) one out-of-ordinary meal every week, hence the name; and by meal, I mean either a dessert or something that can be eaten as lunch or dinner. Last week’s meal of the week was cheesecake, but I did not take any pictures to show you as my blog didn’t exist back then. This week’s extraordinary meal is one of my favorite dishes … lasagna! I know that everyone is a bit biased in regards to their own mother’s cooking, but I assure you: my mom’s lasagna is the best. First, she does not use ricotta cheese. Personally, I’ve never been much of a fan of ricotta cheese, which is why I don’t like many of the lasagna recipes out there. Second, my mom adds bechamel (white) sauce in addition to the usual meat and tomato sauce. Third, she adds ham to each layer, giving a distinct flavor to each bite. And of course, last but not least, she puts all her love when assembling the lasagna. The last statement is corny, I know, but not untrue. And to put it in perspective, as a teenager, I could easily eat half a tray on my own as either lunch or dinner (even breakfast); that’s how much I liked it.

I never attempted to make lasagna on my own, until I found a recipe online that resembled my mom’s recipe; this recipe was posted in Mel’s Kitchen Cafe. My girlfriend K introduced me to Mel’s blog with a great burrito recipe (link). Mel’s delicious recipes and detailed instructions have turned her blog into another one of my favorites. You will find that most of my weekly meals will come from her. I can’t thank K enough for finding this online source of goodness.

After perusing Mel’s recipe index, I found this lasagna recipe. The main difference between Mel’s and my mother’s recipe is how the bechamel is prepared. Maybe one day, if I am worthy enough, I will try my mom’s method. In the meantime, as I learn, I will continue using this recipe; nevertheless, this lasagna is still really close in flavor to that of my mother’s. The only problem is that, since I am not a teenager anymore, I cannot eat half a tray. I need to maintain some degree of portion control.

I took a couple of pictures to show you. Here is the assembled lasagna before the putting it in the oven:

Assembling Lasagna

Here is the lasagna after cutting it into 8 portions:

Lasagna is ready to be eaten!

Surprisingly, each portion is about 600 Calories; I expected more, but you won’t see me complaining.

I didn’t have to modify anything from the original recipe except for four things. First, I used ground beef instead of turkey. Second, I didn’t use mushrooms. Third, I added ham in between layers. And fourth, I had to change the logistics of the tomato sauce as I do not own a handheld immersion blender. Since I have a regular blender with a glass jar, I had to combine the hot vegetable mixture with the tomato sauce and the diced tomatoes. Other than these four things, I followed the recipe to the letter.

The lasagna came out great. The noodles were perfectly moist yet firm to the bite, and the meat sauce combined perfectly with the bechamel, yielding a flavor experience out of this earth; I’ll enjoy this for the next couple of days. Stay tuned for my next Meal Extraordinaire of the Week!

On Measurements and Prior Knowledge

The other day, I found a fun little post in one of my favorite blogs (Nuit Blanche). Miki Lustig, a professor working on applying Compressed Sensing (CS) to fast MRI, drew a set of XKCD-like comics explaining the basic principles of CS in MRI. You can check out the comics here (the drawing of David Donoho is cute and funny, in my opinion).

I found one of the diagrams shown in the comics to be particularly interesting:
Knowledge vs Measurements

This graph shows a concept that may seem remarkably obvious: the more you know about a system/signal/event, the less measurements you need to make. Isn’t that intuitive?

Let’s try to dig a little deeper here. To put things in perspective, there is a well-studied theorem in signal processing called the Shannon-Nyquist criterion, which states that if a signal is bandlimited (finite support in the frequency domain), then it can be perfectly reconstructed from samples taken at a rate greater than at least twice the bandwidth [1]. As the diagram above points out, we don’t need to sample higher than double the highest frequency (plus some factor to account for safety) for lowpass signals. From the engineer’s point of view, this is great as you can tailor your measurement system to the signal of interest; however, there are cases in which Nyquist sample rates may still be too high and expensive to implement.

This is where more knowledge comes into play. CS theory says that if the signal is compressible (as the majority of interesting signals are), then you can, in a sense, measure the compressed data directly thus relaxing the acquisition requirements [2]. For instance, it has been shown that the data collection process in MRI can be significantly sped up without a loss in image quality if the sensing and reconstruction is performed with the tools developed by CS. The compressiblity (signal sparsity in some domain) prior knowledge allows us to reduce the number of measurements needed.

How do we acquire this magical prior knowledge? How do we know this knowledge is correct or even useful? I think that is the engineer’s job: to develop models and design systems in order to meet some requirements. Maybe the diagram needs another axis that shows how wrong the knowledge and how many measurement are needed to compensate for such mistake; however, two axes are enough to get the point across. As an engineer, this prior knowledge and modeling business comes into play very frequently. In Bayesian classification for example, you can incorporate your knowledge in the form of a prior distribution over your measurements to improve your metrics. In CT reconstruction, it has been shown that model based approaches for reconstruction allow the reduction of x-ray dose without sacrificing image quality. I could name many other examples, but I think you get my point; it is the engineer’s task to carefully incorporate knowledge into the system design. Avoiding this could lead to costly or maybe non-realizable systems.

This post might have felt almost like I was rambling without a particular direction, but I thought it would be cool to share this comic as well as my thoughts about it. I am sure that drawing this diagram on the whiteboard in the kitchen area of a research lab would spark interesting discussions at lunch. I think this was a complicated post, so I promise that the next one won’t be engineering related

[1] This discovery has made the digital revolution possible by allowing the implementation of signal processing techniques on computers or embedded devices
[2] I am brushing the context and limitations of this theory aside for this post; in reality, the comparison is a bit unfair as the assumptions between Nyquist and compressive sampling are different. For example, Nyquist deals with infinitely long, continuous signals, whereas compressive sampling has been developed for finite dimensional vectors

Testing Latex

I was thrilled to find that WordPress supports Latex. For those of you who don’t know, Latex is a document typesetting system that, among many features, allows quick mathematical writing.  As an example, I’ll write up the Fourier transform equation, a remarkable tool in the EE’s arsenal1 that decomposes a signal into its representation in the frequency domain (land of sines and cosines). To put it more simply, think of it as trying to determine the ingredients of an already prepared meal; taking the Fourier transform of your lunch will yield its individual components in the ingredient domain. Pretty neat, huh?

So here it goes:

\displaystyle X(f) = \int^\infty_{-\infty} x(t) e^{-j2\pi f t } \, dt

It renders beautifully! I sometimes think how amazing it is that such little formula can have so many applications. The Fourier transform is used extensively in digital communications, circuit design, medical imaging, etc; it even allows us to model the physiology of our hearing! Whatever I write here won’t do it enough justice. I think the Fourier transform deserves its own post.

[1] This could a good name for regular thematic postings, as I can write about useful tools I’ve learned or would like to learn

Introduction to my blog

Hi! My name is Fernando. I am an electrical engineering PhD student focused on brain computer interfaces (BCI). More specifically, my lab’s objective is to improve the speed and reduce the inter-subject variability of BCIs. We currently have multiple applications in the works such as brain controlled wheelchair navigation, spelling interfaces with language models, etc. I am interested in machine learning, statistical signal processing, user interfaces, medical imaging, algorithm design and implementation, optimization, and parallel computing.  Besides working , I enjoy cooking, eating delicious food (kind of obvious as I don’t know anyone who likes unsavory food), action-packed movies, fantasy and philosophical books, playing the piano, and watching competitive Starcraft 2. I sometimes practice mindfulness-based meditation, although I should do it more consistently.

I plan to keep this blog diverse; one day I’ll write about math and engineering, but the following post might be about cooking. However, I do want to come up with at least one periodic topic for my posts. For example, I could do a bi-monthly review of an interesting paper I read or useful concept I learned. I’ll write about it when I decide.  One last thing, this blog will be updated regularly between 2 to 3 times a week, unless something comes up. I hope you enjoy reading my posts!