上海天文台实习的一个项目-根据卫星数据绘制南极星空分布图
大三的时候做的一个东西,当时在上海天文台实习了15天,在老师要求下写了下面一大段代码,现在想起来,都不记得这是干的什么了。
人最可悲的,就是很多东西本来学会了,结果没过多久就忘了。
我只记得,当时是美国的一颗卫星,我们登了它的网站,下载了它的观测数据,经过筛选,大概有4万多个点。然后用这些数据导入进来,根据一些计算,求出绝对星等,以及距离,然后绘制南极星空分布图,用的是极坐标。最后证实了,恒星确实是呈网状分布。
据说,恒星的分布就像丝袜一样:相近的恒星喜欢聚成团,然后各个星系团中间是巨大的空洞。
clc;
clear;
format long
Um=0.3;
Uk=0;
Uv=0.7; %基本参数赋值
z=csvread('shixi_gliming.csv',0,6,'G1..G44103');%导入红移z
for i=1:44103
DC(i)=quad('integrand',0,z(i),0.00001); %计算积分
DM(i)=DC(i); %因为k=0
DL(i)=(1+z(i))*DM(i); %计算光度距离
end
dered_r=csvread('shixi_gliming.csv',0,4,'E1..E44103'); %导入视星等r
for i=1:44103
if z(i)<0.1
p0=-0.194858;
p1=0.912570;
else
p0=-0.242659;
p1=1.38731;
end
M(i)=dered_r(i)-5*log10(DL(i))-25-(p0+p1*z(i))-1.62*(z(i)-0.1);%计算绝对星等M
end
csvwrite('M',M);
dered_g=csvread('shixi_gliming.csv',0,3,'D1..D44103'); %导入视星等g
col=dered_g-dered_r;
figure(1);
plot(z,M,'r.','MarkerSize',5);
legend('绝对星等对红移');xlabel('红移z');ylabel('绝对星等M'); %绝对星等对红移
figure(2);
plot(M,col,'r.','MarkerSize',5);axis([-25 -10 -2 4]);
legend('颜色对绝对星等');xlabel('绝对星等M');ylabel('颜色c'); %颜色对星等
pause;
i=1;n=1;p=1;q=1;s=1;u=1;v=1;l=1;
ra=csvread('shixi_gliming.csv',0,1,'B1..B44103'); %导入经度
for k=1:44103
if M(k)>-24&M(k)<=-23
ra1(i)=ra(k);z1(i)=z(k);col1(i)=col(k);M1(i)=M(k);
i=i+1;
end
end
figure(3);
theta1=ra1*3.14159/180;
rho1=z1;
polar(theta1,rho1,'r.');title('-24<M<=-23');
pause; %画第三张图
for k=1:44103
if M(k)>-23&M(k)<=-22
ra2(l)=ra(k);z2(l)=z(k);col2(l)=col(k);M2(l)=M(k);
l=l+1;
end
end
figure(4);
theta2=ra2*3.14159/180;
rho2=z2;
polar(theta2,rho2,'m.');title('-23<M<=-22');
pause; %画第四张图
for k=1:44103
if M(k)>-22&M(k)<=-21
ra3(n)=ra(k);z3(n)=z(k);col3(n)=col(k);M3(n)=M(k);
n=n+1;
end
end
figure(5);
theta3=ra3*3.14159/180;
rho3=z3;
polar(theta3,rho3,'y.');title('-22<M<=-21');
pause; %画第五张图
for k=1:44103
if M(k)>-21&M(k)<=-20
ra4(p)=ra(k);z4(p)=z(k);col4(p)=col(k);M4(p)=M(k);
p=p+1;
end
end
figure(6);
theta4=ra4*3.14159/180;
rho4=z4;
polar(theta4,rho4,'g.');title('-21<M<=-20');
pause; %画第六张图
for k=1:44103
if M(k)>-20&M(k)<=-19
ra5(q)=ra(k);z5(q)=z(k);col5(q)=col(k);M5(q)=M(k);
q=q+1;
end
end
figure(7);
theta5=ra5*3.14159/180;
rho5=z5;
polar(theta5,rho5,'c.');title('-20<M<=-19');
pause; %画第七张图
for k=1:44103
if M(k)>-19&M(k)<=-18
ra6(s)=ra(k);z6(s)=z(k);col6(s)=col(k);M6(s)=M(k);
s=s+1;
end
end
figure(8);
theta6=ra6*3.14159/180;
rho6=z6;
polar(theta6,rho6,'b.');title('-19<M<=-18');
pause; %画第八张图
for k=1:44103
if M(k)>-18&M(k)<=-17
ra7(u)=ra(k);z7(u)=z(k);col7(u)=col(k);M7(u)=M(k);
u=u+1;
end
end
figure(9);
theta7=ra7*3.14159/180;
rho7=z7;
polar(theta7,rho7,'k.');title('-18<M<=-17');
pause; %画第九张图
for k=1:44103
if M(k)>-17&M(k)<=-16
ra8(v)=ra(k);z8(v)=z(k);col8(v)=col(k);M8(v)=M(k);
v=v+1;
end
end
figure(10);
theta8=ra8*3.14159/180;
rho8=z8;
polar(theta8,rho8,'r.');title('-17<M<=-16');
pause; %画第十张图
figure(11)
polar(theta1,rho1,'r.');
hold on
polar(theta2,rho2,'m.');
hold on
polar(theta3,rho3,'y.');
hold on
polar(theta4,rho4,'g.');
hold on
polar(theta5,rho5,'c.');
hold on
polar(theta6,rho6,'b.');
hold on
polar(theta7,rho7,'k.');
hold on
polar(theta8,rho8,'w.');title('-24<M<-16');%八张图绘在一起
pause;
figure(12);
i=size(z1);w=1;t=1;
for j=1:i(1,2)
if col1(j)>-0.1328*M1(j)-1.991
theta11(w)=theta1(j);rho11(w)=rho1(j);w=w+1;
else
theta12(t)=theta1(j);rho12(t)=rho1(j);t=t+1;
end
end
polar(theta11,rho11,'r.');
hold on
polar(theta12,rho12,'b.');
pause; %画第一幅图
figure(13);
l=size(z2);w=1;t=1;
for j=1:l(1,2)
if col2(j)>-0.1328*M2(j)-1.991
theta21(w)=theta2(j);rho21(w)=rho2(j);w=w+1;
else
theta22(t)=theta2(j);rho22(t)=rho2(j);t=t+1;
end
end
polar(theta21,rho21,'r.');
hold on
polar(theta22,rho22,'b.');
pause; %画第二幅图
figure(14);
n=size(z3);w=1;t=1;
for j=1:n(1,2)
if col3(j)>-0.1328*M3(j)-1.991
theta31(w)=theta3(j);rho31(w)=rho3(j);w=w+1;
else
theta32(t)=theta3(j);rho32(t)=rho3(j);t=t+1;
end
end
polar(theta31,rho31,'r.');
hold on
polar(theta32,rho32,'b.');
pause; %画第三幅图
figure(15);
p=size(z4);w=1;t=1;
for j=1:p(1,2)
if col4(j)>-0.1328*M4(j)-1.991
theta41(w)=theta4(j);rho41(w)=rho4(j);w=w+1;
else
theta42(t)=theta4(j);rho42(t)=rho4(j);t=t+1;
end
end
polar(theta41,rho41,'r.');
hold on
polar(theta42,rho42,'b.');
pause; %画第四幅图
figure(16);
q=size(z5);w=1;t=1;
for j=1:q(1,2)
if col5(j)>-0.1328*M5(j)-1.991
theta51(w)=theta5(j);rho51(w)=rho5(j);w=w+1;
else
theta52(t)=theta5(j);rho52(t)=rho5(j);t=t+1;
end
end
polar(theta51,rho51,'r.');
hold on
polar(theta52,rho52,'b.');
pause; %画第五幅图
figure(17);
s=size(z6);w=1;t=1;
for j=1:s(1,2)
if col6(j)>-0.1328*M6(j)-1.991
theta61(w)=theta6(j);rho61(w)=rho6(j);w=w+1;
else
theta62(t)=theta6(j);rho62(t)=rho6(j);t=t+1;
end
end
polar(theta61,rho61,'r.');
hold on
polar(theta62,rho62,'b.');
pause; %画第六幅图
figure(18);
u=size(z7);w=1;t=1;
for j=1:u(1,2)
if col7(j)>-0.1328*M7(j)-1.991
theta71(w)=theta7(j);rho71(w)=rho7(j);w=w+1;
else
theta72(t)=theta7(j);rho72(t)=rho7(j);t=t+1;
end
end
polar(theta71,rho71,'r.');
hold on
polar(theta72,rho72,'b.');
pause; %画第七幅图
figure(19);
v=size(z8); w=1;t=1;
for j=1:v(1,2)
if col8(j)>-0.1328*M8(j)-1.991
theta81(w)=theta8(j);rho81(w)=rho8(j);w=w+1;
else
theta82(t)=theta8(j);rho82(t)=rho8(j);t=t+1;
end
end
polar(theta81,rho81,'r.');
hold on
polar(theta82,rho82,'b.');
pause; %画第八幅图
figure(20);
w=1;t=1;
for j=1:44103
if col(j)>-0.1328*M(j)-1.991
theta_x(w)=ra(j)*3.14159/180;
rho_x(w)=z(j);w=w+1;
else
theta_y(t)=ra(j)*3.14159/180;
rho_y(t)=z(j);t=t+1;
end
end
polar(theta_x,rho_x,'r.');
hold on
polar(theta_y,rho_y,'b.');
另附函数文件:integrand.M
function y=integrand(x)
DH=3000/0.71;
Um=0.3;
Uk=0;
Uv=0.7;
y=DH*1./sqrt(Um*(1+x).^3+Uk*(1+x).^2+Uv);
上海天文台实习的一个项目-根据卫星数据绘制南极星空分布图相关推荐
- 利用卫星数据绘制热脆弱性图—利用遥感监测城市热量
地球上的很多地方都有逐渐变热的趋势,特别是我们居住的城市,城市吸收并重新释放大量的热量,该热量来自于用来建造城市的混凝土材料.在某些情况下,这可能只是会引起一些不适感,但对于某些城市来说,可能会导致严 ...
- 如何将全国各省份人口数据绘制成地域分布图?Python 轻松解决
今天收到一个可视化数据分析的小需求,客户提供了一份各省份人口的Excel的数据文档.需要将Excel中的数据提取出来,最后将数据展示到一个平面的中国地图上面形成一个可视化的人口分布展示效果. 先展示一 ...
- 一个高效的通用光学卫星数据正射校正程序
李国春 随着高分辨率对地观测卫星发射的日益增多,对数据处理软件的要求也越来越高.通常每个系列卫星都有自己的数据特点并需要专门的处理软件,但卫星数量的增加为每种卫星单独设计软件的压力越来越大.本文介绍的 ...
- 卫星数据现已加入 Azure 豪华套餐,在太空向女神表个白?
近日,微软特别项目研究小组刚刚宣布把2年前沉入苏格兰北部冰冷海底的小型水下数据中心打捞上岸,这个像缩小版"潜水艇"的数据中心里有 864 台服务器.27.6 PB的数据存储.潜过水 ...
- envi反演水质参数_科技前沿基于GOCI静止水色卫星数据的长江口及邻近海域Kd(490)遥感反演及其在机载激光测深预评估中的应用...
点击上方"溪流之海洋人生"即可订阅哦 长江是我国的第一大河流,每年输入东海的悬浮泥沙含量可达1.81亿t(据大通站2000-2011年输沙量资料),巨量的悬浮泥沙在口门堆积,造成长 ...
- 基于 Sentinel-2 卫星数据的像元三分法模型
Github项目 一.基本概念 端元:组成混合像元的纯净地物被称作是端元: 混合像元产生的原因: 传感器的采样频率小于或等于地表空间变异的频率,使得单个像元对应地面的面积较大, 故包含了多种地物类型: ...
- 哨兵2号(Sentinel-2)卫星数据批量处理
李国春 2021 10 11 哨兵2号(Sentinel-2)数据广受欢迎,数据质量好,还免费.人家欧空局有自己的处理软件,也有控制台命令行的批量处理.RSD也来凑凑热闹沾个光,指不定有人喜欢不同的操 ...
- 高分2(GF2)卫星数据系列处理
目录 GF2卫星数据系列处理 一.打开.正射校正GF2 0.89m PAN数据 二.GF2 0.89m PAN数据几何精校正 1 . 导入基准数据 2 . 启用"小黑手"采集GCP ...
- 论一个糟糕的大数据码农的自我修养
幸福的家庭都是一样的,不幸的家庭各有各的不幸 - 论一个糟糕的大数据平台工程师的自我修养 本来想写写如何成为一名优秀的大数据平台开发工程师,但说实话,这个话题太简单了!虽然我没有被Jeff dean大 ...
最新文章
- JS计算起点坐标到终点坐标的驾车距离和驾车时间
- BZOJ4327 : JSOI2012 玄武密码
- MySQL(一)MySQL基础介绍
- 99.99%安卓手机存在系统安全漏洞
- java获取文件编码_java如何获取文件编码格式
- macos降级_iOS12.3 beta2更新了什么 iOS12.3测试版2新特性与升降级方法
- uni-app目录结构介绍
- 软件测试中的风控,测试过程中会遇到哪些风险和机会?
- 2500个常用中文字符 + 130常用中英文字符
- 【转-参考】九宫格时间管理-第三代时间管理方法:人生平衡发展的八个方向
- hdu5773 2016年多校4 nlogn求LIS
- ictclas4j java_ictclas4j 分词工具包 安装流程
- python中and和or的惰性求值特点_Python 惰性求值
- 总结JS中Math的方法及使用
- hdu1754(线段树单点更新)
- android 手动连接wifi,android手动连接wifi的过程
- Python 打造基于有道翻译的命令行翻译工具(命令行爱好者必备)
- python-点击消除
- 微信小程序在 wxml 文件中使用 Array.includes 方法
- 【币圈小试牛刀】期现套利(上)——期限套利原理
热门文章
- PARAMETERS、SELECTION OPTIONS和SELECTION SCREEN的全部用法
- 渡一教育公开课web前端开发JavaScript精英课学习笔记(二十九)JavaScript 骇客帝国
- 微信推送平台-测试号定制推送
- Kaggle数据竞赛记录 - IEEE-CIS Fraud Detection
- 鼠绘-汽车侧面绘制过程
- 18春计算机辅助设计作业答案,18春福师《计算机辅助设计—MAYA》在线作业二答案...
- 历史课堂上的经典对白
- Unity Shader Lab 模型切线和法线
- 我的博客开通啦,以后会记录一位IT女的学习生涯
- python生成10个随机密码_python生成随机密码