Archive for 2013

Optical spectra of 5 new Be/X-ray Binaries in the Small Magellanic Cloud and the link of the supergiant B[e] star LHA 115-S 18 with an X-ray source

Grigoris Maravelias, Andreas Zezas, Vallia Antoniou, Despoina Hatzidimitriou

The Small Magellanic Cloud (SMC) is well known to harbor a large number of High-Mass X-ray Binaries (HMXBs). The identification of their optical counterparts provides information on the nature of the donor stars and can help to constrain the parameters of these systems and their evolution. We obtained optical spectra for a number of HMXBs identified in previous Chandra and XMM-Newton surveys of the SMC using the AAOmega/2dF fiber-fed spectrograph at the Anglo-Australian Telescope. We find 5 new Be/X-ray binaries (BeXRBs; including a tentative one), by identifying the spectral type of their optical counterparts, and we confirm the spectral classification of an additional 15 known BeXRBs. We compared the spectral types, orbital periods, and eccentricities of the BeXRB populations in the SMC and the Milky Way and we find marginal evidence for difference between the spectral type distributions, but no statistically significant differences for the orbital periods and the eccentricities. Moreover, our search revealed that the well known supergiant B[e] star LHA 115-S 18 (or AzV 154) is associated with the weak X-ray source CXOU J005409.57-724143.5. We provide evidence that the supergiant star LHA 115-S 18 is the optical counterpart of the X-ray source, and we discuss different possibilities of the origin of its low X-ray luminosity (Lx ~ 4 x 10^33 erg/s).

arXiv:1312.0593

While writing a paper I was puzzled to see that although I was not putting anything in LaTeX code to affect the orientation of the page (Image 1), some pages were rotated at the final pdf file (Image 2). But why was that? Although I did play around to see if there was something wrong with the images, or the code, or whatever could possible go wrong with the LaTeX, the output was the same.

latex2pdf-1

Image 1: The LaTeX code – nothing unusual here, just inserting some figures.

latex2pdf-2

Image 2: The final pdf output. Clockwise: (1) a page with text, (2) a page with some figures properly shown, (3) the problematic page – it should be oriented as portrait and not landscape, (4) the next page with, properly displayed, plots.

From the final pdf document (Image 2, “page” 3) it is obvious that LaTeX does not do anything wrong. The page has the proper portrait orientation, but the pdf page is rotated. Looking around to see what could go wrong with the ps2pdf conversion I found out that:
“By default Ghostscript determines viewing page orientation based on the dominant text orientation on the page. Sometimes, when the page has text in several orientations or has no text at all, wrong orientation can be selected.” [1]

Since the images used are eps files [2], which means that they are text files, and they have plenty of text vertically oriented, Ghostscript takes their orientation as the proper one. When I manually run:
ps2pdf -dAutoRotatePages=/None file.ps file.pdf
these orientation issues removed.

Another idea is to use some extra invisible text (like white text in a white background) in order to increase the horizontal text. That way Ghostscript will select the right orientation from the beginning. A way to do it is presented in [3], but in my case it didn’t work well as it was also increasing the length of caption resulting in its displacement. Moreover, if highlighted the text become visible.

[1] Ps2pdf/Orientation
[2] wikipedia.org/EncapsulatedPostScript
[3] TeX-stackexchange.com/phantom-and-line-break

Comet ISON survives! (or not…)

Posted November 29, 2013 By grigoris

A great gif image[1] of the passage of comet ISON (C/2012 S1) from the Sun, as observed from the SOHO coronagraph!

As the initial image is rather big to upload here (~19MB), I just took some parts of it only, with the most interesting parts.

cometISON-10

cometISON-11

cometISON-12

cometISON-13

cometISON-14

cometISON-15

cometISON-16

A systematic campaign has been launched for this comet [2], as it has been believed to be the comet of the century. Although rather disappointing at the beginning it did revived rather unexpectedly before as it was approaching the Sun. Let’s see now what is left and what we will see in the sky. Will it become a naked eye wonder?

[1] SpaceWeather.com
[2] NASA Comet ISON Observing Campaign

UPDATED on 2/Dec/2013:
Although it seemed likely that comet ISON survived its close passage from the Sun, it probable transformed into a small cloud of dust which dissolves fast. After almost 2 days there is almost nothing to see in the images of SOHO.
You can find the updated gif image at SpaceWeather.com

cometISON-21

cometISON-22

Bash scripting: convert float to integer

Posted November 26, 2013 By grigoris

As bash is not able to handle floats the best way is to convert a float number (which is represented as a string, for example an output with awk) into an integer.

To do this [1,2]:
float=1.23
int=${float%.*}

Refs:
[1] Stackexchange.com/Unix & Linux
[2] Linuxquestions.org

Fast note on Wien’s law

Posted November 24, 2013 By grigoris

Just a quick reminder* !

λmax = 2.89776829 x 106 nm K / T

[*] Wien’s displacement law

LaTeX: wide figure or table in a 2 column document

Posted November 15, 2013 By grigoris

Much simpler than I thought, but still I think it deserves a note in order not to forget it!

Simple add the * when using each element (figure/table)[1].
This will place it as wide as the page, but only at the top of the page.

[1]: LaTeX wiki: Floats, Figures and Captions

Where are the stsdas/synphot template spectra?

Posted November 4, 2013 By grigoris

After having looked and searched into the whole IRAF/PyRAF directory to point out the directory that contains the template spectra for the stsdas/synphot package it was just a matter of a quick look at the front page of the package to resolve the issue!

As it is said: “Since the data files used by synphot in its calculations are rather large, they are distributed separately”
and they provide the links to the compressed files containing all the template data.

At the beginning we started looking into which path these files are stored since you can call each template by using the environmental variable crcalspec$template_spectrum. But this variable looks at the path where these templates are stored (outside IRAF), as it is defined (when installed) though the crref variable.

New Paper on exoplanets – the SEAWOLF project

Posted October 31, 2013 By grigoris

Trawling for transits in a sea of noise: A Search for Exoplanets by Analysis of WASP Optical Lightcurves and Follow-up (SEAWOLF)

E. Gaidos, D. R. Anderson, S. Lepine, K. D. Colon, G. Maravelias, N. Narita, E. Chang, J. Beyer, A. Fukui, J. D. Armstrong, A. Zezas, B. J. Fulton, A. W. Mann, R. G. West, F. Faedi

Studies of transiting Neptune-size planets orbiting close to nearby bright stars can inform theories of planet formation because mass and radius and therefore mean density can be accurately estimated and compared with interior models. The distribution of such planets with stellar mass and orbital period relative to their Jovian-mass counterparts can test scenarios of orbital migration, and whether “hot” (period < 10d) Neptunes evolved from “hot” Jupiters as a result of mass loss. We searched 1763 late K and early M dwarf stars for transiting Neptunes by analyzing photometry from the Wide Angle Search for Planets and obtaining high-precision (<10−3) follow-up photometry of stars with candidate transit signals. One star in our sample (GJ 436) hosts a previously reported hot Neptune. We identified 92 candidate signals among 80 other stars and carried out 148 observations of predicted candidate transits with 1-2 m telescopes. Data on 70 WASP signals rules out transits for 39 of them; 28 other signals are ambiguous and/or require more data. Three systems have transit-like events in follow-up photometry and we plan additional follow-up observations. On the basis of no confirmed detections in our survey, we place an upper limit of 10.25% on the occurrence of hot Neptunes around late K and early M dwarfs (95% confidence). A single confirmed detection would translate to an occurrence of 5.3±4.4%. The latter figure is similar to that from Doppler surveys, suggesting that GJ 436b may be the only transiting hot Neptune in our sample. Our analysis of Kepler data for similar but more distant late-type dwarfs yields an occurrence of 0.32±0.21%. Depending on which occurrence is applicable, we estimate that the Next Generation Transit Survey will discover either ~60 or ~1000 hot Neptunes around late K and early M-type dwarfs.

arXiv:1310.7586

Updating clock time through terminal

Posted October 22, 2013 By grigoris

In my Fedora 14 desktop I keep losing minutes without knowing how and why (doesn’t the clock update automatically?).
At the beginning I tried to change the file /etc/ntp.conf (edit it and change the parameter server to: ‘server pool.ntp.org’; 1) as perhaps the server did not respond correctly.
I tried to update by:
ntpdate pool.ntp.org

but the result was not the expected one, but an error: “… the NTP socket is in use, exiting”
I stopped (/etc/init.d/ntpd stop) and tried to updated (ntpdate pool.ntp.org) but another error was raised: “… no server suitable for synchronization found” (reasonable though since …ntd was down!).

By looking a little bit around the solution [2] was to update while running as:
ntpdate -u pool.ntp.org

and…that’s it! I removed the extra entry in the /etc/ntp.conf (to keep the original servers only) and it worked again.

Now let’s see if it’s going to keep up or I will need to manually update the clock from time to time.

References:
[1]: Cyberciti.biz – Synchronize the system clock to Network Time Protocol (NTP) under Fedora or Red Hat Linux
[2]: Superuser.com – Socket is in use

MNRAS and eps font type

Posted September 29, 2013 By grigoris

I was ready to submit my revised version at the MNRAS site, when I encountered some difficulties that I didn’t expected (although I knew that there would be some!).

So, you have to upload a complete file of your paper (either pdf or ps) along with the source files (images, tex files, etc). At my first attempt their automatic online pdf tool fail to work properly and the error was:

“We are sorry, but there is a problem with your submitted file(s) named ….pdf. Our system cannot process this file. The most common reason for this is badly embedded fonts or Type 3 fonts (which we do not support at the moment). If possible, please change the font settings and/or redistil this PDF to a lower Adobe Acrobat version and try again.

and by reading more (‘Read more’ link):

“A Type 3 font error is due to bit mapped fonts in your document or missing fonts used within the document. Bitmapped fonts display poorly on screen in PDF files and sometimes cause printing problems. We recommend for Word Documents that you embed your fonts and re-upload the file(s), or for PDF’s save them using Acrobat 6 (or lower).”

I tried their proposed solutions (adding the LaTeX packages: \usepackage[T1]{fontenc} and \usepackage{aecompl} , and trying also the \pdfminorversion=5) but nothing worked out. Then I tried to look around to see if there was any related post but nothing obvious (1; even though close). At some point, probably when I understood the context of the ‘Read more’, I uploaded the pdf file with text only and it worked! That means that there was a problem with font type of the images. I uploaded again the pdf file with only one image and the site refused to create the pdf file like before. I re-tried with an image that I hadn’t created myself and that one worked! So, definitely the problem was with my images, as produced through matplotlib.

At first I searched and asked various lists for an relatively easy way to the change the font type of the eps images by editing them somehow, without success (2 for example did not work, I didn’t try ps2ps/gs and psfrag, GIMP could also do it but the quality was lower). Since I was pressed by the deadline I decided not to look around for side-ways but proceed with brute force: re-create all plots! Although this didn’t involve any serious data processing (only to read some files), yet it was a serious amount of time since for many of plots I had to re-assign manually some plot parameters. Moreover, I had to find how to do it within matplotlib.

Thankfully, that was not that hard to perform. Following a similar post (3) I found the appropriate parameter inside the matplotlibrc for the postscript files: ps.fonttype
for which there are two options: “3” for Type3 fonts and “42” for TrueType. The default value is “3”, so by adding the line

from matplotlib import rcParams
rcParams['ps.fonttype'] = 42

in my scripts I could save the plots with the appropriate font type (I could of course change the default value but for some reason I thought not to do it know). All plots were done … all? except one, for which I did not understand why it kept been saved with type3 fonts – for that I used GIMP!

And finally … the paper was submitted!

References:
[1]: tex.stackexchange.com – How do I avoid Type3 fonts when submitting to ManuscriptCentral
[2]: osmanoglu.org – Embed fonts in EPS/PDF
[3]: stackoverflow.com – Cannot edit text in chart exported by Matplotlib and opened in Illustrator