Wednesday, October 25, 2023

ถ้าย้ายเครื่อง ก็ต้องย้ายโฟลเดอร์ไปด้วยเช่นกัน aips data folder issue (solved)

ในกรณีทำ virtual machine ลิงค์ดาต้าจากเครื่องอื่น ให้ก็อปปี้ดาต้ามาที่โฟลเดอร์ใหม่ด้วยเช่นกัน เช่น /lustre/NRA/aips/DA00/ชื่อโฟลเดอร์ดาต้าของเครื่องใหม่หรือ virtual machine cp -r folderเก่าที่มีดาต้าเดิม folderใหม่ที่ต้องการหรือของเครื่องvirtual machine

Friday, October 20, 2023

test latex equation in the blogger

<html>
<head>  
 <script async="" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-MML-AM_CHTML" type="text/javascript">
 </script>
</head>
<body>
<font size="3" face="times" color="black">

\[ \vec{A}  = 5\hat{x} + 4\hat{y}   \]

</font>
</body>
</html>
\[ \vec{A} = 5\hat{x} + 4\hat{y} \]

How to connect an external harddisk with AIPS? การเซ็ทดิสก์ภายนอกให้อ่านและเซฟข้อมูลให้กับ aips

 เนื้อความเอกสาร คัดลอกและปรับแต่งจาก https://texco.exblog.jp/21697794/ ขอขอบคุณมา ณ ที่นี้

ปัญหาสำหรับข้อมูลด้านดาราศาสตร์วิทยุคือ มีปริมาณมหาศาลในแต่ละไฟล์ ดังนั้น เราจึงขยายขนาดการจัดเก็บพื้นที่ไปที่ external harddisk โดยการทำดังนี้ 

1) สร้างพื้นที่โฟลเดอร์จัดเก็บใน external harddisk ไว้รอ ใช้ชื่ออะไรก็ได้ ในที่นี้ใช้ชื่อว่า LOCALHOST_2 จะได้สอดคล้องกับข้อมูลที่จัดเก็บใน aips หรือ LOCALHOST_1

/Volumes/My_Passport/LOCALHOST_2

2) สร้างพื้นที่ว่างเปล่าชื่อว่า SPACE ไว้ใน LOCALHOST_2

 touch SPACE

3) ให้สร้าง symbol link จาก external harddisk ไปยังไดรฟ์ DATA ของ aips
%cd  DATA (เข้าไปที่ DATA ของ aips ก่อน)

 % ls  (ลิสต์ดูว่ามีข้อมูลอะไรบ้าง)

LOCALHOST_1

ln -s /Volumes/My_Passport/LOCALHOST_2 LOCALHOST_2 => สร้าง symbol link จาก external harddisk ไปยัง DATA ของ aips

% ls -n

total 0

drwxrwsr-x  7567 501  20  242144 Oct  2 17:58 LOCALHOST_1

lrwxr-xr-x     1 501  20      32 Oct 20 13:37 LOCALHOST_2 -> /Volumes/My_Passport/LOCALHOST_2 จะมีเครื่องหมายลูกศรกำกับ บอกว่าเวลาเรียกหาโฟลเดอร์ LOCALHOST_2 มันจะวิ่งไปหาที่ external harddisk ด้วยชื่อนี้


4) แก้ไขไฟล์ DADEVS.LIST และ NETSP ใน aips

% cd ../DA00

DA00 % ls

DADEVS.LIST NETSP TPDEVS.LIST

LOCALHOST PRDEVS.LIST TPHOSTS


ใช้ซอฟแวร์อะไรก็ได้แก้ไขไฟล์ DADEVS.LIST เพื่อบอกโปรแกรม aips ว่าเราสร้างโฟลเดอร์ LOCALHOST_2 ไว้แล้วใน DA00


DADEVS.LIST
#-----------------------------------------------------------------------
#-----------------------------------------------------------------------
#; Copyright (C) 1995
#; Associated Universities, Inc. Washington DC, USA.
#;
#; This program is free software; you can redistribute it and/or
#; modify it under the terms of the GNU General Public License as
#; published by the Free Software Foundation; either version 2 of
#; the License, or (at your option) any later version.
#;
#; This program is distributed in the hope that it will be useful,
#; but WITHOUT ANY WARRANTY; without even the implied warranty of
#; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#; GNU General Public License for more details.
#;
#; You should have received a copy of the GNU General Public
#; License along with this program; if not, write to the Free
#; Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
#; MA 02139, USA.
#;
#; Correspondence concerning AIPS should be addressed as follows:
#; Internet email: aipsmail@nrao.edu.
#; Postal address: AIPS Project Office
#; National Radio Astronomy Observatory
#; 520 Edgemont Road
#; Charlottesville, VA 22903-2475 USA
#-----------------------------------------------------------------------
# DADEVS.LIST
#-----------------------------------------------------------------------
# This is a DADEVS list file containing a list of AIPS data directories.
# Refer to $AIPS_ROOT/DADEVS.SH for more information.
#-----------------------------------------------------------------------
/Users/narit/aips/DATA/LOCALHOST_1

/Users/narit/aips/DATA/LOCALHOST_2


ใช้ซอฟแวร์อะไรก็ได้แก้ไขไฟล์ NETSP เพื่อบอกโปรแกรม aips ว่าเราให้สิทธิ์โฟลเดอร์ LOCALHOST_2 ใน DA00 จัดเก็บข้อมูลทั้งปี

NETSP
#-----------------------------------------------------------------------
#; Copyright (C) 1995
#; Associated Universities, Inc. Washington DC, USA.
#;
#; This program is free software; you can redistribute it and/or
#; modify it under the terms of the GNU General Public License as
#; published by the Free Software Foundation; either version 2 of
#; the License, or (at your option) any later version.
#;
#; This program is distributed in the hope that it will be useful,
#; but WITHOUT ANY WARRANTY; without even the implied warranty of
#; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#; GNU General Public License for more details.
#;
#; You should have received a copy of the GNU General Public
#; License along with this program; if not, write to the Free
#; Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
#; MA 02139, USA.
#;
#; Correspondence concerning AIPS should be addressed as follows:
#; Internet email: aipsmail@nrao.edu.
#; Postal address: AIPS Project Office
#; National Radio Astronomy Observatory
#; 520 Edgemont Road
#; Charlottesville, VA 22903-2475 USA
#-----------------------------------------------------------------------
# NETSP contains network-wide AIPS system parameter definitions.
#-----------------------------------------------------------------------
#
# ZDCHIN will look for this file in $NET0 if it succeeds in translating
# logical NVOL, indicating that the AIPS network data disk allocation
# facility is in use. The system is implemented via the DADEVS.SH
# and optional DADEVS.PL perl script which defines NVOL, and DA0[1-Z].
#
# ZDCHIN interprets each entry as
# 1) location of the data disk (translated value of DA0[1-F])
# e.g. /DATA/ATELES_3
# 2) the TIMDEST limit for the disk, in days
# e.g. 7.0
# 3) eight AIPS booking system user numbers (-1 in first => scratch)
# e.g. 1 29 0 0 0 0 0 0
#
# When editing this file, DO NOT USE THE TAB KEY OR INSERT ANY TABS!
# (the tab is usually control-I). The "white space" between parameters
# MUST be comprised of nothing but spaces. Also, make sure the last
# line includes a newline, otherwise that data area will not be counted.
#-----------------------------------------------------------------------
# Disk name TIMDEST --------------Allowed Users-----------
/Users/narit/aips/DATA/LOCALHOST_1 365.0 0 0 0 0 0 0 0 0
/Users/narit/aips/DATA/LOCALHOST_2 365.0 0 0 0 0 0 0 0 0


5) เปลี่ยนสิทธิ์การเป็นเจ้าของเพื่อการอ่านและบันทึกไฟล์ใน external disk โดยให้สิทธิ์ user ชื่อ narit, group:staff ใช้งานได้ใน external harddisk
$ chown -R [user name] /Volumes/KAGOSHIMA/Takeaki-Ozawa
$ chgrp -R [grp name] /Volumes/KAGOSHIMA/Takeaki-Ozawa
ในที่นี่เปลี่ยนเป็น 

% chown -R narit /Volumes/My_Passport/LOCALHOST_2

% chgrp -R staff /Volumes/My_Passport/LOCALHOST_2


-R option หมายถึง มีสิทธิ์แก้ไขภายในโฟลเดอร์นั้น ๆ 

เวลาใช้งานใน aips ให้เขียนว่า 

ind 1 => LOCALHOST_1

ind 2 => LOCALHOST_2


outd 1, outd 2 ก็จะเซฟข้อมูลตามกำหนดนั่นเอง 

แต่ถ้าจะดู disk ทั้งหมดกำหนดเป็น ind 0 ก็จะลิสต์ทั้งหมดมาให้


หมายเหตุ สำหรับการใช้ NTFS ไฟล์แบบใหม่นี้ จำต้องให้ Mac apple M1 ขึ้นไป (หรือ M2) หรือแม้แต่ Linux sytem รู้จักก่อน ซึ่งต้องติดตั้งไฟล์พิเศษเพื่ออ่านและเขียน โดยเฉพาะ ผู้ใช้งานเลือกใช้ iBoysoft NTFS เพราะว่าใช้งานได้ง่ายดีคะ

TEC DATA DOES NOT COVER FULL RANGE OF CL TABLE

Check your listr and if the data are observed more than one day you need to download the IONEX files at least 2 files and put in the same fo...