Synchronic maps are a standard data product from the CHMAP pipeline. These are instantaneous full-sun maps created
by combining co-temporal images from multiple spacecraft (e.g. STEREO-A, STEREO-B, & AIA).
Each synchronic map has an accompanying "quality" map. The goal of a quality maps is to display where data at each pixel came from, and the cosine of the center-to-limb angle (mu) of the origin image at that
point.
defquality_map(db_session,map_data_dir,inst_list,query_pd,euv_combined,chd_combined=None,color_list=None):euv_origin_image=euv_combined.origin_imageeuv_origins=np.unique(euv_origin_image)euv_image=np.empty(euv_origin_image.shape,dtype=object)foreuv_idineuv_origins:query_ind=np.where(query_pd['data_id']==euv_id)instrument=query_pd['instrument'].iloc[query_ind[0]]iflen(instrument)!=0:euv_image=np.where(euv_origin_image!=euv_id,euv_image,instrument.iloc[0])Plotting.PlotQualityMap(euv_combined,euv_image,inst_list,color_list,nfig='EUV Quality Map '+str(euv_combined.image_info.date_obs[0]),title='EUV Quality Map: Mu Dependent\n'+str(euv_combined.image_info.date_obs[0]))ifchd_combinedisnotNone:chd_origin_image=chd_combined.origin_imagechd_origins=np.unique(chd_origin_image)chd_image=np.empty(chd_origin_image.shape,dtype=object)forchd_idinchd_origins:query_ind=np.where(query_pd['data_id']==chd_id)instrument=query_pd['instrument'].iloc[query_ind[0]]iflen(instrument)!=0:chd_image=np.where(euv_origin_image!=chd_id,chd_image,instrument.iloc[0])Plotting.PlotQualityMap(chd_combined,chd_image,inst_list,color_list,nfig='CHD Quality Map '+str(chd_combined.image_info.date_obs[0]),title='CHD Quality Map: Mu Dependent\n'+str(chd_combined.image_info.date_obs[0]),map_type='CHD')# save these maps to databasereturnNone