権威からのメール

英国の大御所教授からメールが来た。

 

教授は3月に自分が投稿した論文の査読者になったのだが、あいにくその教授は俺の論文の仮定の甘さを理由に

「こんなひどい論文を通す気にはなれない」

と真っ向から否定された。

 

知り合いが以前、こういっていた。

「自分が査読者で誰かの論文をrejectする場合は、

”異議があるなら私に直接連絡すればいくらでも議論に応じます"

と書くようにしている」

と言っていた。まさにこのパターンである。

 

まだrejectが確定されたわけではないが、査読者のcriticalな意見は主に2つ:

(1)「真の速度分散」「仮の速度分散」を求める式変形の近似が2カ所甘い。

(2)数値実験の結果「真=仮」になっているのはよいとしても、その理由をつかみ損ねている。数値実験で用いた分布関数が特定の引数に対してseparateだからうまくいった、と主張しているが、反例が存在する。

(3)ベイズ定理を利用した確率の式に不用意な式変形がある

 

(1)(2)は、数値実験だとうまくいっているので、数値実験で得た結果の本質をとらえ直すことで解決できるはずである。

(2)の結果を用いて観測結果のいろいろな解釈を行っているので、その部分は再考した結果に応じて改訂されることになるだろう。

(3)は、先行研究でごまかしてあった場所を厳密に扱おうとしたのだが、言われてみると自分も似たようなごまかしをしている気もして来た。

 

「大御所と若手のバトル」という格好の良いレベルの戦いではなく、今回は自分の計算に非があったということをきちんと認識したい。

正直、大御所からメールが来たときは、「何を言ってるんだ俺が正しい」なんて思っていた。が、自分の修行が足りないだけだった。笑

rejectされるかはここできっちり考えた結果に依存する。自分からまいた種だが、大御所と意見を交えることができることは光栄なことだ。(修士の学生の頃、大御所の書いた教科書にサインをしてもらったこともあるww)そう考えて、真摯に取り組もう。

出張メモ

個人用メモ。持ち物をまとめる:

 

[最低限]

・パスポート

・財布(お金/カード)

・眼鏡

 

[仕事]

・ポスター

Macbook Air & 充電器

・携帯電話 充電器 [=目覚まし]

・電源プラグのアダプタ

・筆記用具

・USB

 

[日常]

・e-ticket

・旅程表

・腕時計

・家のカギ(研究所のカギはおいていく)

※ 出発時間は?

※ 電車の乗換は? 

 

[日用品]

・歯ブラシ(電動なら充電)

・歯磨き粉(機内持ち込み不可)

・ひげ剃り

・小タオル(あっても困ることはない)

・風邪薬

・傘

 

[衣類]

・下着1枚/日+2枚;洗濯も可能だが、時間的余裕がないことも多い

・羽織るもの(寒暖に対応)

・ワイシャツやポロシャツ(季節による)

・ズボン & ベルト

・靴下

・パジャマ

 

 [その他]

・音楽walkman

・カメラ

 

画像変換 ImageMagickの周辺事項(convert, pdfcrop)

Imagemagickでいろんなことができるのだと学んだ。

(1)convert
pdf > eps or level-2 eps
などができる。

$ convert test.pdf test_level1.eps
$ convert test.pdf eps2:test_level2.eps


(例)圧縮率が違うとこんなに違う

・pdf: 0.45MB
・level-1 eps: 32MB
・level-2 eps: 0.88MB

参考1
http://osksn2.hep.sci.osaka-u.ac.jp/~naga/miscellaneous/tex/tex-eps.html

参考2
http://m.ils.uec.ac.jp/memo/eps.txt


(2)pdfcrop
pdfの余白を自動で切り取ってくれる。
keynoteで図を作成したりするとどうしても余白ができてしまう。

$ pdfcrop test.pdf
>> test-crop.pdf という、トリミングされたpdfができる(60秒ほど要することもある)。

$ convert test-crop.pdf eps2:test-crop.eps
>> test-crop.eps という、トリミングされたepsができる。

参考
http://tex.stackexchange.com/questions/171455/what-is-a-good-workflow-for-importing-and-cropping-eps-images


(3)参考

理由は不明だが、以下の方法では余白のないepsを作れない。

・previewで範囲を選択 Commend+c Command+n Command+s (名前をtest2.pdfとして保存)
>> test2.pdf は、トリミングされて「いる」。
・$ convert test2.pdf eps2:test2.eps
>> test2.eps は、トリミングされて「いない」。

 

 

Mac yosemite で convert を使えるようにする

紆余曲折を経て yosemite で convert コマンドが使えるようになった。

いろいろやったので何がうまくいったのかわからんが、最後にやった手順を残しておく。

(0)症状 symptoms
$ convert test.pdf test.jpg
-bash: convert: command not found

$ convert -v
-bash: convert: command not found

$ convert --help
-bash: convert: command not found

$ which convert
何も表示されない


(1)手順 procedures 
Homebrewのウィンドウで
$ brew --prefix
$ hash -r
$ brew info imagemagick
$ hash -r
$ brew link imagemagick
$ hash -r
$ brew reinstall imagemagick
$ hash -r

それぞれのコマンドに対する出力によって手順が変わる可能性があるので、下記サイトのリンクをはっておく。
参考 http://apple.stackexchange.com/questions/177594/to-install-brews-imagemagick-and-fix-its-symlink?answertab=votes#tab-top

... which was very helpful


(2)convert が使えるか確認
$ convert -v
Version: ImageMagick 6.9.0-10 Q16 x86_64 2015-03-09 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png xml zlib

Usage: convert [options ...] file [ [options ...] file ...] [options ...] file
(以下長い出力が続くが省略)

$ convert --help
Version: ImageMagick 6.9.0-10 Q16 x86_64 2015-03-09 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png xml zlib

Usage: convert [options ...] file [ [options ...] file ...] [options ...] file
(こちらも、同様に長い出力が続くが省略)


(3)(1)以前に試したこと[どれかは役に立っているかもしれないw]

(あ)Xquartzはすでにインストールしていた。

(い)ghostscript
http://pages.uoregon.edu/koch/ 
経由でghostscript 9.15をインストール
$ gs -v
GPL Ghostscript 9.15 (2014-09-22)
Copyright (C) 2014 Artifex Software, Inc. All rights reserved.
http://cactuslab.com/imagemagick/

(う)ImageMagick for Mac OS X
ImageMagick installer for Mac OS X [ http://cactuslab.com/imagemagick/ ]
から、
・「ImageMagick 6.9.1-0 for Mac OS X 10.5 – 10.10」(XQuartz不要の版 (7.5MB)) をインストール > しかし convert 使えない症状は改善せず
・「ImageMagick 6.9.1-0 for Mac OS X 10.5 – 10.10」(Requires XQuartz. (7.8 MB)) をインストール > しかし convert 使えない症状は改善せず

 

MacTex2014, TeXShop設定

日本語tex文書を作成するために設定。

以前mactex2012を使っていた頃に(設定を無闇にいじりすぎたせいか)日本語がことごとく文字化けするという現象になやまされていた。今回の設定で文字化けも解消。

 

(1)MacTex2014をインストール

1.

MacTeX-2012をアンインストール(これは不要らしいが、以前のは結局日本語が打てないので消した。)

$ which platex

/usr/texbin/platex

$ cd /usr/local/texlive/

$ ls
2012       texmf-local

$ sudo rm -rf 2012

 

2. ミラーサイトからMacTeX.pkgをダウンロード

Safariを用いる。(Chromeだとファイルが壊れていた。)

・正しいサイズか確認。

$ openssl md5 /Users/my_name/Downloads/MacTeX.pkg
MD5(/Users/my_name/Downloads/MacTeX.pkg)= 2cc593b1b35fba63a7bd27fab145b04c

 

3. MacTeX.pkgを使ってインストール

・なお、chromeを使ってDLしたものはインストールに失敗した。

=本家のウェブサイトのFAQが役立つ。

 

4. TeXShopを最新版にする。

・メニューバーから簡単にupdateできる。

・文字化けは最新版(ver3.36 >>> ver3.50)にしたら解消した。

 

5. TeXShop設定。

Preferenceで設定をするのは2つのみ:

[encoding] UTF-8

[set default values] を pTeX (ptex2pdf) にする(参考1を参照)。upTeXにはしなかった(参考2ではupTeX推奨らしい)。

 

参考1 Mac OS XへのLaTeXとTeXShopのインストレーション

参考2 http://oku.edu.mie-u.ac.jp/~okumura/texwiki/?TeXShop%2F%E8%A8%AD%E5%AE%9A#c0acd0ab

 

----

[追記]:以上はmacbook air OSX 10.7.5 Lion 

mac mini OSX 10.10 yosemite では、1-5をやっても文字化けが解消されなかった。が、

6.  mac mini を再起動

という手順を踏んだところ解決。

cppcheck インストール

c言語メモリリークを調べるツールとしてcppcheckをmacに入れてみる。

の両方に入れた。

手順としてはhomebrewをインストールしてhomebrew経由でcoocheckをインストール。

 


(1)homebrew をインストールする


$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

出力の最後に
Run `brew doctor` before you install anything
Run `brew help` to get started
と出てくる。

$ brew doctor

出力の最初は
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
となっている。
実際、たくさんのerror messageが出てくるが、気にしない。

(2) cppcheckをインストールする
$ brew install cppcheck


参考

http://brew.sh/index_ja.html
http://ttbf.redxxiii.com/archives/243

 

Mac mini 設定 [GSL] [gcc47]

mac mini で gsl を使うためにやったこと。

OpenMPを使う前提で、gcc47 をMacports 経由で入れた。さらに、gsl のオプション -I/usr/local/include を省略するために.bash_profile に加筆をした。

 

(1) gcc47 のインストール

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

$ sudo port selfupdate
$ sudo port sync

$ port search gcc
...
gcc47 @4.7.4_3 (lang)
    The GNU compiler collection

...
openmpi-gcc47 @1.7.5_3 (science, parallel, net)
    A High Performance Message Passing Library  →これいつか試そう。

...

などが出てくる。

$ sudo port install gcc47

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

$ sudo port select --list gcc
Password:
Available versions for gcc:
    mp-gcc47
    none (active)

$ sudo port select gcc mp-gcc47
Selecting 'mp-gcc47' for 'gcc' succeeded. 'mp-gcc47' is now active.

$ sudo port select --list gcc
Available versions for gcc:
    mp-gcc47 (active)
    none

ターミナル再起動(新しいタブを開く)

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin14/4.7.4/lto-wrapper
Target: x86_64-apple-darwin14
Configured with: /opt/local/var/macports/build/_opt_mports_dports_lang_gcc47/gcc47/work/gcc-4.7.4/configure --prefix=/opt/local --build=x86_64-apple-darwin14 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc47 --includedir=/opt/local/include/gcc47 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.7 --with-libiconv-prefix=/opt/local --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.7 --with-gxx-include-dir=/opt/local/include/gcc47/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-ppl=/opt/local --with-cloog=/opt/local --enable-cloog-backend=isl --disable-cloog-version-check --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --disable-ppl-version-check --with-pkgversion='MacPorts gcc47 4.7.4_3'
Thread model: posix
gcc version 4.7.4 (MacPorts gcc47 4.7.4_3)

 

(2) .bash_profile 加筆

$ cd →ホームディレクトリへ移動

$ ls -a .bash_profile

$ vi .bash_profile

としてファイルを開く。ファイルには

MANPATH=/opt/local/man:$MANPATH
とだけ書かれていた。viで以下の文を加筆し、保存し、閉じる。
---ここから---
# Added by *****(me)***** when trying to set the gcc options (02 Jan 2015)
export C_INCLUDE_PATH=/usr/local/include:$C_INCLUDE_PATH

---ここまで---

$ source ~/.bash_profile

として、ターミナルを再起動。

$ echo $C_INCLUDE_PATH
/usr/local/include:

となれば成功。

 

この設定により、gslを用いてコンパイルするとき、

設定前 $ gcc -o hoge hoge.c -I/usr/local/include -lgsl -lgslcblas -lm

  ↓

設定後 $ gcc -o hoge hoge.c -lgsl -lgslcblas -lm

のようにコンパイルオプションが減らせる。

 

ただ、macbook air のときはデフォルトで-I/usr/local/include を省けていたし、airでの環境変数 C_INCLUDE_PATH は空白(何も設定されていない)だった。この辺の理由はよくわからない。