2015-04-13

R.app warning on Mac

If install R.app on a Mac without default locale setting to UTF-8, warning message comes up while starting up R.app. The warning message is as follows:


To solve this issue, close R.app and type following command in terminal.
$> defaults write org.R-project.R force.LANG en_US.UTF-8
Relaunch R.app and the warning disappears.

Reference
[1] http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Internationalization-of-the-R_002eapp

2015-04-06

深奧Whisky

最近迷上whisky,買了幾瓶酒跟幾本書,開始研究起whisky的奧妙。以前不懂,總覺得whisky好辣好嗆,根本喝不出什麼味道;拜喝咖啡所賜,對於味道的分辨有進步,除了高濃度酒精的嗆辣,多少可以喝出其他的味道。

看了書的介紹,才發現whisky也是博大精深,今天看到幾個酒標上的名詞解釋,終於解開心中的疑惑。

Malt Whisky
麥芽whisky,原料為大麥,將大麥的種子浸泡於水中,等待發芽;接著經過糖化及發酵,再經過蒸餾及熟成,最後裝瓶所得的酒即為whisky。

Single Malt Whisky
由單一蒸餾廠所生產的whisky稱為single malt whisky。從原料到製程都是一致的,因此single malt whisky會有該蒸餾廠獨特的味道。

Scotch Whisky
只有在蘇格蘭製造且熟成三年以上的whisky可稱為Scotch whisky,其他地區生產的whisky不能冠上Scotch的名稱。

Single Malt Scotch Whisky
在蘇格蘭生產的single malt whisky。

Single Cask
在裝瓶的過程中,只取單一熟成酒桶的原酒來裝瓶的whisky稱為single cask。一般而言,single malt在裝瓶時會挑選同一批但是不同酒桶的原酒來裝瓶,以平衡不同酒桶之間產生的差異。因此single cask不只會有該蒸餾廠獨特的味道,還會增添不同酒桶的獨特性。

Vatted Malt
與single malt類似,都是純麥,差異為裝瓶時不只取用單一蒸餾廠的原酒,同時取用附近地區多個蒸餾廠的原酒裝瓶,這樣的whisky表現的味道為該地區的特色而不只是單一蒸餾廠的特色。

Blended Malt
這是一個容易混淆的名詞。大致上與vatted malt同義,但是太容易造成混淆,比較少用。Malt whisky在取得原酒裝瓶的範圍由大至小為:vatted whisky > single malt whisky > single cask whisky。

Grain Whisky
不使用麥芽為原料但是製程與malt whisky相同所生產的whisky稱為grain whisky,常用的原料有玉米及裸麥。

Blended Scotch Whisky
由malt whisky及grain whisky為原酒,並且在蘇格蘭調和製成的whisky即為blended scotch whisky。

Whisk(e)y
Whisky與Whiskey是相同的,一般的誤解是美式英文的拼法與英式英文拼法的不同。但事實上是指whisky類型的不同,蘇格蘭及加拿大生產的會用whisky;而愛爾蘭生產的會用whiskey;美國生產的多用whiskey,但有的廠牌也使用whisky。

Reference
[1] Michael Jackson's Malt Whisky Companion 6th Edition
[2] 漫畫威士忌入門 (古谷三敏)

2015-04-02

Color terms

Additive color
Color created by mixing a number of different light colors. Adding red, green and blue together forms like sun light so the color becomes white.


Subtractive color
Color created by mixing dyes or inks. The color of dyes or inks is the only visible spectrum reflecting to eyes and other visible spectrum are absorbed. Hence the color mixed by red, green and blue together absorbs all visible spectrum and the color is black.


Hue
Map colors to a cyclic color wheel.

Saturation
Saturation is one type of colorfulness. The saturation of a color is determined by a combination of light intensity and how much it is distributed across the spectrum of different wavelengths.

HSL and HSV
HSL (hue-saturation-lightness) and HSV (hue-saturation-value) are cylindrical-coordinate representations of points in an RGB color model.

Chromaticity
An objective specification of the quality of a color regardless of its luminance. Chromaticity consists of two independent parameters, often specified as hue (h) and colorfulness (s).

CIE color space
Human eye has three kinds of cone cells, which sense light, with spectral sensitivity peaks in short (S, 420-440nm), middle (M, 530-540nm) and long (L, 560-580nm) wavelengths. Three parameters (S, M, L), corresponding to levels of stimulus of the three types of cone cells, can in principle describe any color sensation, called LMS color space.

A color space maps a range of physical produced colors to an objective description of color sensations registered in the eye, typically in terms of tristimulus values. The tristimulus values associate with a color space can be conceptualized as amounts of three primary colors in a tri-chromatic additive color model.

Most wavelengths will not stimulate only one type of cone cell due to overlap of spectral sensitivity curves. LMS tristimulus values for pure spectral colors would imply negative values for at least one of these three primary colors. To avoid negative RBG values and to have one component describing brightness, "imaginary" primary colors and corresponding color-matching functions have formulated. The resulting tristimulus values are X, Y, Z (XYZ color space).

Humans tend to perceive light within green parts of the spectrum as brighter than red or blue. The luminosity function that describes the perceived brightness of different wavelengths is thus roughly analogous to M.

CIE model defines Y as luminance, Z is quasi-equal to blue stimulation (S cone response), and X is a mix of cone response curves chosen to be non-negative.

The chromaticity of a color is specified by two derived parameters x and y, two of the three normalized values which are functions of all three tristimulus values, X, Y and Z.

The derived color space specified by x, y and Y is known as xyY color space and is widely used to specify colors in practice.

CIE Chromaticity Diagram
The outer curved boundary is the spectral locus, with wavelengths in nanometers. This diagram represents all of the chromaticities visible to average person. All visible chromaticities correspond to non-negative values of x, y and z.

Reference
[1] https://en.wikipedia.org/wiki/Additive_color
[2] https://en.wikipedia.org/wiki/Subtractive_color
[3] https://en.wikipedia.org/wiki/Hue
[4] https://en.wikipedia.org/wiki/Colorfulness
[5] https://en.wikipedia.org/wiki/HSL_and_HSV
[6] https://en.wikipedia.org/wiki/Chromaticity
[7] https://graphics.stanford.edu/courses/cs178-10/applets/threedgamut.html
[8] https://en.wikipedia.org/wiki/CIE_1931_color_space
[9] https://en.wikipedia.org/wiki/Color_space

2015-04-01

Photometry terms




Luminous flux 光通量 (phi)
The amount of light radiated by a light source per second, and the unit is Lumen (lm). Often used to specify the total amount of light emitted by a lamp. It does not specify the directions in which the light is radiated. 

Luminous intensity 光度 (I)
The amount of light that travels in certain directions from the source, and is measured in Candelas (cd).

Illuminance 照度 (E)
The amount of light falling on a surface is illuminance, and the unit is Lux (lm/m^2).

Luminance 亮度 (L)
The light is reflected off of surfaces and is measured in Candelas per square meter (cd/m^2).

Reference
[1] http://academy.autodesk.com/library/building-science/measuring-light-levels
[2] http://www.lighting.philips.com/main/connect/lighting_university/just_in_time_learning_videos_about_lighting/luminous-flux.wpd