Commit 2e7e18da authored by Zhang Xin's avatar Zhang Xin
Browse files

optimise mermory question

parent e2110d7f
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ from astropy import units as u
import numpy as np
import math
from survey_sim.constraints import surveyConstraint
import gc

PI_180 = math.pi / 180
M_1_PI = 1 / math.pi
@@ -204,10 +205,10 @@ class SkyMap(object):
                self.skymap[key].ecl_lat >= self.surveyConstraint.ECLIPTIC_LAT_LIMIT_S_LOW
                and self.skymap[key].ecl_lat <= self.surveyConstraint.ECLIPTIC_LAT_LIMIT_S_HI
            ):
                self.skymap[key].setCoordinateValue_galactic()
                # self.skymap[key].setCoordinateValue_galactic()
                if np.fabs(self.skymap[key].gb) >= self.surveyConstraint.GALATIC_LAT_LIMIT:
                    self.skymap[key].setCoordinateValue_icrs()
                    self.skymap[key].setCoordinateValue_cartesian()
                    # self.skymap[key].setCoordinateValue_icrs()
                    # self.skymap[key].setCoordinateValue_cartesian()
                    self.skymap[key].isObserve = 1
                    # self.skymap_id.append(key)
                else:
@@ -228,6 +229,7 @@ class SkyMap(object):
                coor.up_neighbour = -1
            if coor.down_neighbour not in self.skymap:
                coor.down_neighbour = -1
        gc.collect()

    def addSkyUnit(self, lonList=None, latList=None, idBase=100000000, obsTyp=0):
        if lonList is None or latList is None:
+143 −127
Original line number Diff line number Diff line
@@ -17,14 +17,23 @@ PI_180 = math.pi / 180


class SkyPatchUnit(object):
    __slots__ = [
        'weight', 'ecl_lat', 'ecl_lon', 'ecl_cor', 'obsType',
        'p_quaternion', 'p_local_x_axis', 'p_local_y_axis', 'p_local_z_axis',
        'sat_Attitude', 'solar_plane_norm', 'flag', 'id', 'isObserve',
        'targetCoverNum', 'maxCoverNum', 'sky_sub_type',
        'left_neighbour', 'right_neighbour', 'up_neighbour', 'down_neighbour',
        'filter', 'x', 'y', 'z', 'dist2orig', 'gb', 'gl', 'ra', 'dec'
    ]

    def __init__(self, ecl_lat=60.0, ecl_lon=-40.0, id=100000):
        """最后选择权重最小的作为最优的选择结果(不是权重最大的)"""
        self.weight = 999999.0  # 计算权重,这两个可以合起来
        self.wFactor = 999999.0  # 计算权重,这两个可以合起来
        self.ecl_lat = ecl_lat
        self.ecl_lon = ecl_lon
        self.weight = (999999.0)  # 计算权重,这两个可以合起来
        # self.wFactor = 999999.0  # 计算权重,这两个可以合起来
        self.ecl_lat = (ecl_lat)
        self.ecl_lon = (ecl_lon)

        self.ecl_cor = coord.SkyCoord(
        ecl_cor = coord.SkyCoord(
            self.ecl_lon * u.degree,
            self.ecl_lat * u.degree,
            frame="geocentricmeanecliptic",
@@ -32,11 +41,13 @@ class SkyPatchUnit(object):
        )  # J2000 地心黄道坐标

        # 0: wide survey, 1:deepsurvey
        # 天区类型:0:宽场、1:深场、2:9平方度甚深场、3:银河系核球、4:银河系及近邻星系、5:早期优先观测的弱引力透镜
        self.obsType = 0

        # 每个指向定义一个四元数,z轴向北,定义x轴为指向方向,y轴为垂直太阳帆板方向被向太阳
        self.p_quaternion = cTools.transfer2lonlat_quaternion_noPa(
            lon=ecl_lon, lat=ecl_lat)

        self.p_local_x_axis = cTools.rotate_vector_by_quaternion(
            [1., 0., 0.], self.p_quaternion)
        self.p_local_y_axis = cTools.rotate_vector_by_quaternion(
@@ -44,48 +55,52 @@ class SkyPatchUnit(object):
        self.p_local_z_axis = cTools.rotate_vector_by_quaternion(
            [0., 0., 1.], self.p_quaternion)

        # self.p_quaternion.astype(np.float32)
        # self.p_local_x_axis.astype(np.float32)
        # self.p_local_y_axis.astype(np.float32)
        # self.p_local_z_axis.astype(np.float32)
        self.sat_Attitude = self.p_quaternion
        self.solar_plane_norm = -self.p_local_y_axis
        # self.cos_sun_planeNorm = 0.0  # 太阳和帆板法线的夹角,这里只是为了记录方便

        # equ_cor = ecl_cor.transform_to("icrs")  # 转换到icrs下ra,dec
        # self.ra = equ_cor.ra.value  # 赤经 J2000 太阳系质心坐标系ICRS
        # self.dec = equ_cor.dec.value  # 赤纬 J2000 太阳系质心坐标系ICRS
        equ_cor = ecl_cor.transform_to("icrs")  # 转换到icrs下ra,dec
        self.ra = equ_cor.ra.value  # 赤经 J2000 太阳系质心坐标系ICRS
        self.dec = equ_cor.dec.value  # 赤纬 J2000 太阳系质心坐标系ICRS

        # # The positive x direction (i.e., the l=0, b=0 direction) points to the center of the Milky Way and the z-axis points toward the North Galactic Pole (following the IAU’s 1958 definition)
        # gala_cor = ecl_cor.transform_to("galactic")
        gala_cor = ecl_cor.transform_to("galactic")

        # self.gb = gala_cor.b.value  # 银纬 太阳系质心
        # self.gl = gala_cor.l.value  # 银经 太阳系质心
        self.gb = gala_cor.b.value  # 银纬 太阳系质心
        self.gl = gala_cor.l.value  # 银经 太阳系质心

        # # 	Cartesian coordinate ,related with equator coordinate,笛卡尔坐标,第四个是距离原点(也就是地心)的距离,黄道坐标系
        # cartesianXYZ = ecl_cor.cartesian
        # self.x = cartesianXYZ.x.value
        # self.y = cartesianXYZ.y.value
        # self.z = cartesianXYZ.z.value
        # self.dist2orig = 1.0
        cartesianXYZ = ecl_cor.cartesian
        self.x = cartesianXYZ.x.value
        self.y = cartesianXYZ.y.value
        self.z = cartesianXYZ.z.value
        self.dist2orig = ecl_cor.distance
        """-------------------solar panel-------------------"""
        # 	normal vector of the plane of solar panel
        # 	这三个是帆板法线

        self.nx = 0.0
        self.ny = 0.0
        self.nz = 0.0

        # 	//	normal vector +-30 deg of the plane of solar panel
        # 	// 	这六个分别是帆板法线在法线平面内向两个方向转动一定角度后的向量,之前是转30°,现在不一定是30°
        self.nx30 = 0.0
        self.ny30 = 0.0
        self.nz30 = 0.0
        self.nx30_ = 0.0
        self.ny30_ = 0.0
        self.nz30_ = 0.0

        # the normal of the plane(decided by the vector point and the normal of solar panel)
        # 有这样一个平面,指向向量和帆板法线向量构成的平面,下面三个是这面的法线
        self.nnx = 0.0
        self.nny = 0.0
        self.nnz = 0.0
        # self.nx = 0.0
        # self.ny = 0.0
        # self.nz = 0.0

        # # 	//	normal vector +-30 deg of the plane of solar panel
        # # 	// 	这六个分别是帆板法线在法线平面内向两个方向转动一定角度后的向量,之前是转30°,现在不一定是30°
        # self.nx30 = 0.0
        # self.ny30 = 0.0
        # self.nz30 = 0.0
        # self.nx30_ = 0.0
        # self.ny30_ = 0.0
        # self.nz30_ = 0.0

        # # the normal of the plane(decided by the vector point and the normal of solar panel)
        # # 有这样一个平面,指向向量和帆板法线向量构成的平面,下面三个是这面的法线
        # self.nnx = 0.0
        # self.nny = 0.0
        # self.nnz = 0.0

        # 	/*-------------------END solar panel-------------------*/

@@ -98,13 +113,14 @@ class SkyPatchUnit(object):
            id  # 每一个天区都有一个id,从0开始编号的,前面多色成像天区,后面极深度
        )

        self.IsInSunSideFlag = 0  # 是否在阳照区
        # self.IsInSunSideFlag = 0  # 是否在阳照区
        self.isObserve = 1  # 0表示不可观测; 1表示可观测
        self.targetCoverNum = 2  # 该天区需要观测次数
        self.maxCoverNum = 4  # 该天区最大可以观测次数

        self.sky_type = 0  # 天区类型:宽场、深场、9平方度甚深场、银河系核球、银河系及近邻星系、早期优先观测的弱引力透镜
        self.sky_sub_type = 0  # 银河系及近邻星系”的观测天区部分与主巡天相同,但观测次数要求更多,因此增加sky_sub_type用于区分和策略权重计算
        # self.sky_type = 0  # 天区类型:宽场、深场、9平方度甚深场、银河系核球、银河系及近邻星系、早期优先观测的弱引力透镜
        # 银河系及近邻星系”的观测天区部分与主巡天相同,但观测次数要求更多,因此增加sky_sub_type用于区分和策略权重计算
        self.sky_sub_type = 0

        # 	下面四个是该天区上下左右相邻的四个天区的id,在高纬度不是很准确,高纬度找最近的四个天区
        self.left_neighbour = -1
@@ -120,93 +136,93 @@ class SkyPatchUnit(object):

    # 计算太阳帆板的法线,因为帆板始终要对着太阳面,所以太阳帆板的法线与太阳的夹角要小于90°
    # 太阳帆板可旋转,计算一定旋转角度范围内,帆板法线的范围
    def set_solar_normal(self, sun_x=0.0, sun_y=0.0, sun_z=1.5e8, sundist=1.5e8):
        px = self.x
        py = self.y
        pz = self.z
        polar_vec = np.array([0, 0, 1.0])
        norm_xyz = np.cross(np.array([px, py, pz]), polar_vec)
        norm_xyz = norm_xyz/np.linalg.norm(norm_xyz)
        # print(np.linalg.norm(norm_xyz), '----------------------------------')
        # 太阳帆板的法线与太阳的夹角要小于90°
        cosNormalandSun = np.dot(norm_xyz, np.array([sun_x, sun_y, sun_z]))
        if cosNormalandSun < 0:
            norm_xyz = norm_xyz * -1
            cosNormalandSun = -1 * cosNormalandSun
        cosNormalandSun = cosNormalandSun / (sundist)
        self.nx = norm_xyz[0]
        self.ny = norm_xyz[1]
        self.nz = norm_xyz[2]
        return cosNormalandSun

    def calculate_solar_normal(self, sun_x=0.0, sun_y=0.0, sun_z=1.5e8, sundist=1.5e8):
        px = self.x
        py = self.y
        pz = self.z
        polar_vec = np.array([0, 0, 1.0])
        norm_xyz = np.cross(np.array([px, py, pz]), polar_vec)
        norm_xyz = norm_xyz/np.linalg.norm(norm_xyz)
        # print(np.linalg.norm(norm_xyz), '----------------------------------')
        # 太阳帆板的法线与太阳的夹角要小于90°
        cosNormalandSun = np.dot(norm_xyz, np.array([sun_x, sun_y, sun_z]))
        if cosNormalandSun < 0:
            norm_xyz = norm_xyz * -1
            cosNormalandSun = -1 * cosNormalandSun
        cosNormalandSun = cosNormalandSun / (sundist)
    # def set_solar_normal(self, sun_x=0.0, sun_y=0.0, sun_z=1.5e8, sundist=1.5e8):
    #     px = self.x
    #     py = self.y
    #     pz = self.z
    #     polar_vec = np.array([0, 0, 1.0])
    #     norm_xyz = np.cross(np.array([px, py, pz]), polar_vec)
    #     norm_xyz = norm_xyz/np.linalg.norm(norm_xyz)
    #     # print(np.linalg.norm(norm_xyz), '----------------------------------')
    #     # 太阳帆板的法线与太阳的夹角要小于90°
    #     cosNormalandSun = np.dot(norm_xyz, np.array([sun_x, sun_y, sun_z]))
    #     if cosNormalandSun < 0:
    #         norm_xyz = norm_xyz * -1
    #         cosNormalandSun = -1 * cosNormalandSun
    #     cosNormalandSun = cosNormalandSun / (sundist)
    #     self.nx = norm_xyz[0]
    #     self.ny = norm_xyz[1]
    #     self.nz = norm_xyz[2]
        return cosNormalandSun, norm_xyz

    def set_solar_normal_transRange(self, panel_trans_angle=25):
        px = self.x
        py = self.y
        pz = self.z
        norm_xyz = [self.nx, self.ny, self.nz]
        angle = panel_trans_angle * PI_180
        a = math.cos(angle)
        b = math.sin(angle)
        p = np.linalg.norm([px, py, pz])
        n = np.linalg.norm(norm_xyz)
        t_nx30 = a * self.nx * p / n + b * px
        t_ny30 = a * self.ny * p / n + b * py
        t_nz30 = a * self.nz * p / n + b * pz

        t_nx30_ = a * self.nx * p / n - b * px
        t_ny30_ = a * self.ny * p / n - b * py
        t_nz30_ = a * self.nz * p / n - b * pz
        self.nx30 = t_nx30
        self.ny30 = t_ny30
        self.nz30 = t_nz30

        self.nx30_ = t_nx30_
        self.ny30_ = t_ny30_
        self.nz30_ = t_nz30_

        # 有这样一个平面,指向向量和帆板法线向量构成的平面,下面三个是这面的法线
        npn = np.cross(np.array([px, py, pz]), norm_xyz)
        npn = npn / np.linalg.norm(npn)

        self.nnx = npn[0]
        self.nny = npn[1]
        self.nnz = npn[2]

    def setCoordinateValue_cartesian(self):
        # 	Cartesian coordinate ,related with equator coordinate,笛卡尔坐标,第四个是距离原点(也就是地心)的距离,黄道坐标系
        cartesianXYZ = self.ecl_cor.cartesian
        self.x = cartesianXYZ.x.value
        self.y = cartesianXYZ.y.value
        self.z = cartesianXYZ.z.value
        self.dist2orig = self.ecl_cor.distance  # 1.0
    #     return cosNormalandSun

    # def calculate_solar_normal(self, sun_x=0.0, sun_y=0.0, sun_z=1.5e8, sundist=1.5e8):
    #     px = self.x
    #     py = self.y
    #     pz = self.z
    #     polar_vec = np.array([0, 0, 1.0])
    #     norm_xyz = np.cross(np.array([px, py, pz]), polar_vec)
    #     norm_xyz = norm_xyz/np.linalg.norm(norm_xyz)
    #     # print(np.linalg.norm(norm_xyz), '----------------------------------')
    #     # 太阳帆板的法线与太阳的夹角要小于90°
    #     cosNormalandSun = np.dot(norm_xyz, np.array([sun_x, sun_y, sun_z]))
    #     if cosNormalandSun < 0:
    #         norm_xyz = norm_xyz * -1
    #         cosNormalandSun = -1 * cosNormalandSun
    #     cosNormalandSun = cosNormalandSun / (sundist)
    #     # self.nx = norm_xyz[0]
    #     # self.ny = norm_xyz[1]
    #     # self.nz = norm_xyz[2]
    #     return cosNormalandSun, norm_xyz

    # def set_solar_normal_transRange(self, panel_trans_angle=25):
    #     px = self.x
    #     py = self.y
    #     pz = self.z
    #     norm_xyz = [self.nx, self.ny, self.nz]
    #     angle = panel_trans_angle * PI_180
    #     a = math.cos(angle)
    #     b = math.sin(angle)
    #     p = np.linalg.norm([px, py, pz])
    #     n = np.linalg.norm(norm_xyz)
    #     t_nx30 = a * self.nx * p / n + b * px
    #     t_ny30 = a * self.ny * p / n + b * py
    #     t_nz30 = a * self.nz * p / n + b * pz

    #     t_nx30_ = a * self.nx * p / n - b * px
    #     t_ny30_ = a * self.ny * p / n - b * py
    #     t_nz30_ = a * self.nz * p / n - b * pz
    #     self.nx30 = t_nx30
    #     self.ny30 = t_ny30
    #     self.nz30 = t_nz30

    #     self.nx30_ = t_nx30_
    #     self.ny30_ = t_ny30_
    #     self.nz30_ = t_nz30_

    #     # 有这样一个平面,指向向量和帆板法线向量构成的平面,下面三个是这面的法线
    #     npn = np.cross(np.array([px, py, pz]), norm_xyz)
    #     npn = npn / np.linalg.norm(npn)

    #     self.nnx = npn[0]
    #     self.nny = npn[1]
    #     self.nnz = npn[2]

    # def setCoordinateValue_cartesian(self):
    #     # 	Cartesian coordinate ,related with equator coordinate,笛卡尔坐标,第四个是距离原点(也就是地心)的距离,黄道坐标系
    #     cartesianXYZ = self.ecl_cor.cartesian
    #     self.x = (cartesianXYZ.x.value)
    #     self.y = (cartesianXYZ.y.value)
    #     self.z = (cartesianXYZ.z.value)
    #     self.dist2orig = self.ecl_cor.distance  # 1.0

    def setCoordinateValue_galactic(self):
        # The positive x direction (i.e., the l=0, b=0 direction) points to the center of the Milky Way and the z-axis points toward the North Galactic Pole (following the IAU’s 1958 definition)
        gala_cor = self.ecl_cor.transform_to("galactic")
    # def setCoordinateValue_galactic(self):
    #     # The positive x direction (i.e., the l=0, b=0 direction) points to the center of the Milky Way and the z-axis points toward the North Galactic Pole (following the IAU’s 1958 definition)
    #     gala_cor = self.ecl_cor.transform_to("galactic")

        self.gb = gala_cor.b.value  # 银纬 太阳系质心
        self.gl = gala_cor.l.value  # 银经 太阳系质心
    #     self.gb = (gala_cor.b.value)  # 银纬 太阳系质心
    #     self.gl = (gala_cor.l.value)  # 银经 太阳系质心

    def setCoordinateValue_icrs(self):
        equ_cor = self.ecl_cor.transform_to("icrs")  # 转换到icrs下ra,dec
        self.ra = equ_cor.ra.value  # 赤经 J2000 太阳系质心坐标系ICRS
        self.dec = equ_cor.dec.value  # 赤纬 J2000 太阳系质心坐标系ICRS
    # def setCoordinateValue_icrs(self):
    #     equ_cor = self.ecl_cor.transform_to("icrs")  # 转换到icrs下ra,dec
    #     self.ra = (equ_cor.ra.value)  # 赤经 J2000 太阳系质心坐标系ICRS
    #     self.dec = (equ_cor.dec.value)  # 赤纬 J2000 太阳系质心坐标系ICRS
+18 −36
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
Author: Zhang Xin zhangx@bao.ac.cn
Date: 2024-09-19 15:53:27
LastEditors: Zhang Xin zhangx@bao.ac.cn
LastEditTime: 2025-06-30 09:49:51
LastEditTime: 2025-07-09 10:11:22
FilePath: /CSST_Survey/survey_sim/strategies/SurveySim_MSC.py
Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
'''
@@ -498,7 +498,7 @@ class SurveySim(object):
            )

            smF = open(skyMap_init_data, "wb")
            pickle.dump(self.skymap, smF)
            pickle.dump(self.skymap, smF, protocol=pickle.HIGHEST_PROTOCOL)

    def do_observe_plan(self, jump_time_norm=60, jump_time_unObs=120):
        comm = MPI.COMM_WORLD
@@ -557,41 +557,23 @@ class SurveySim(object):
                        self.bettery_level = self.surveyCons.BATTERY_MAX

                sec_times = np.arange(
                    start_end_t[0]-0.001, start_end_t[1]+0.001, 5/86400.)
                    start_end_t[0]-0.001, start_end_t[1]+0.001, 10/86400.)
                len_sat_array = len(sec_times)
                sat_info_sec = np.zeros([len_sat_array, 10])
                sat_info_sec = np.zeros([len_sat_array, 3])
                for tmp_i, temp_t in enumerate(sec_times):
                    sat_info_sec[tmp_i, 0:3], _, orbitDataId = locateSat1(
                    # sat_info_sec[tmp_i, 0:3], _, orbitDataId = locateSat1(
                    #     time=temp_t, OrbitData=self.orbitDat, startId=orbitDataId, calVelFlag=False
                    # )
                    sat_equ, _, orbitDataId = locateSat1(
                        time=temp_t, OrbitData=self.orbitDat, startId=orbitDataId, calVelFlag=False
                    )
                    # sat_info_sec[tmp_i, 3:5] = _utils.getSatSubpoint(
                    #     sat_info_sec[tmp_i, 0:3], temp_t)
                    sat_eq_coord_i = csstSkyCoordGeocentricEquator(
                        coorEquator=sat_info_sec[tmp_i, 0:3], curJdTime=temp_t)
                    sat_info_sec[tmp_i, 5:8], sat_info_sec[tmp_i,
                                                           8:], _ = sat_eq_coord_i.getGeocentricTrueEcliptic()
                        coorEquator=sat_equ, curJdTime=temp_t)
                    sat_info_sec[tmp_i,
                                 0:], _, _ = sat_eq_coord_i.getGeocentricTrueEcliptic()
                orbitDataId = 0
                # sat_xi = interpolate.interp1d(
                #     sec_times, sat_info_sec[:, 0], kind="linear", bounds_error=False, assume_sorted=True)
                # sat_yi = interpolate.interp1d(
                #     sec_times, sat_info_sec[:, 1], kind="linear", bounds_error=False, assume_sorted=True)
                # sat_zi = interpolate.interp1d(
                #     sec_times, sat_info_sec[:, 2], kind="linear", bounds_error=False, assume_sorted=True)
                # sat_ecl_xi = interpolate.interp1d(
                #     sec_times, sat_info_sec[:, 5], kind="linear", bounds_error=False, assume_sorted=True)
                # sat_ecl_yi = interpolate.interp1d(
                #     sec_times, sat_info_sec[:, 6], kind="linear", bounds_error=False, assume_sorted=True)
                # sat_ecl_zi = interpolate.interp1d(
                #     sec_times, sat_info_sec[:, 7], kind="linear", bounds_error=False, assume_sorted=True)
                # sat_ecl_loni = interpolate.interp1d(
                #     sec_times, sat_info_sec[:, 8], kind="linear", bounds_error=False, assume_sorted=True)
                # sat_ecl_lati = interpolate.interp1d(
                #     sec_times, sat_info_sec[:, 9], kind="linear", bounds_error=False, assume_sorted=True)

                # subPoint_xi = interpolate.interp1d(
                #     sec_times, sat_info_sec[:, 3], kind="linear")
                # subPoint_yi = interpolate.interp1d(
                #     sec_times, sat_info_sec[:, 4], kind="linear")

                curTime = start_end_t[0]
                lastSatAtt = None
@@ -857,18 +839,18 @@ class SurveySim(object):
        after_expTime_JD = after_tTime_JD + expTimes/86400.

        sat_ecl_x_tTime = fast_interpolate(
            time_list, satInfo_list[:, 5], after_tTime_JD, kind='linear', fill_value=np.nan)
            time_list, satInfo_list[:, 0], after_tTime_JD, kind='linear', fill_value=np.nan)
        sat_ecl_y_tTime = fast_interpolate(
            time_list, satInfo_list[:, 6], after_tTime_JD, kind='linear', fill_value=np.nan)
            time_list, satInfo_list[:, 1], after_tTime_JD, kind='linear', fill_value=np.nan)
        sat_ecl_z_tTime = fast_interpolate(
            time_list, satInfo_list[:, 7], after_tTime_JD, kind='linear', fill_value=np.nan)
            time_list, satInfo_list[:, 2], after_tTime_JD, kind='linear', fill_value=np.nan)

        sat_ecl_x_expTime = fast_interpolate(
            time_list, satInfo_list[:, 5], after_expTime_JD, kind='linear', fill_value=np.nan)
            time_list, satInfo_list[:, 0], after_expTime_JD, kind='linear', fill_value=np.nan)
        sat_ecl_y_expTime = fast_interpolate(
            time_list, satInfo_list[:, 6], after_expTime_JD, kind='linear', fill_value=np.nan)
            time_list, satInfo_list[:, 1], after_expTime_JD, kind='linear', fill_value=np.nan)
        sat_ecl_z_expTime = fast_interpolate(
            time_list, satInfo_list[:, 7], after_expTime_JD, kind='linear', fill_value=np.nan)
            time_list, satInfo_list[:, 2], after_expTime_JD, kind='linear', fill_value=np.nan)

        # print(skymap_ids.shape, value_sun_angle_to_nomals.shape, tAngle_array.shape)
        skymap_ids = np.stack(
@@ -1025,7 +1007,7 @@ class SurveySim(object):
            self.cmgCons.checkAndAdjustCmgNodes()
            self.bettery_level = final_energy

            # gc.collect()
            gc.collect()

            return returnTime, otime, self.skymap.skymap[final_index], sun_r1, moon_r1, sat_r1, satVel_r1, orbitDataId_r1, isInSunSide, final_exp_time, final_Angle, curSatAtt, self.cmgCons.total_cmg, final_energy

+407 MiB

File added.

No diff preview for this file type.