Detailed Design of the Science Operations for the XRISM mission

XRISM is an X-ray astronomical mission by the JAXA, NASA, ESA and other international participants, that is planned for launch in 2022 (Japanese fiscal year), to quickly restore high-resolution X-ray spectroscopy of astrophysical objects. To enhance the scientific outputs of the mission, the Science Operations Team (SOT) is structured independently from the instrument teams and the Mission Operations Team. The responsibilities of the SOT are divided into four categories: 1) guest observer program and data distributions, 2) distribution of analysis software and the calibration database, 3) guest observer support activities, and 4) performance verification and optimization activities. As the first step, lessons on the science operations learned from past Japanese X-ray missions are reviewed, and 15 kinds of lessons are identified. Among them, a) the importance of early preparation of the operations from the ground stage, b) construction of an independent team for science operations separate from the instrument development, and c) operations with well-defined duties by appointed members are recognized as key lessons. Then, the team structure and the task division between the mission and science operations are defined; the tasks are shared among Japan, US, and Europe and are performed by three centers, the SOC, SDC, and ESAC, respectively. The SOC is designed to perform tasks close to the spacecraft operations, such as spacecraft planning, quick-look health checks, pre-pipeline processing, etc., and the SDC covers tasks regarding data calibration processing, maintenance of analysis tools, etc. The data-archive and user-support activities are covered both by the SOC and SDC. Finally, the science-operations tasks and tools are defined and prepared before launch.


Introduction
The X-Ray Imaging and Spectroscopy Mission (XRISM) 1 is an X-ray astronomical mission led by the Japan Aerospace Exploration Agency (JAXA) and National Aeronautics and Space Administration (NASA), in collaboration with the European Space Agency (ESA) and other international partners, that is planned for launch in 2022 (Japanese fiscal year) to restore high-resolution X-ray spectroscopy after the loss of the Hitomi satellite. 2 The XRISM mission has four scientific objectives: 3 1) understanding the formation of the structure of the universe and evolution of clusters of galaxies by measuring turbulent and Doppler velocities at the 300 km/s level in spatially resolved spectroscopy of clusters of galaxies, 2) understanding the circulation history of baryonic matter in the universe from high-resolution spectroscopy of phenomena such as supernova remnants and supernovae, 3) understanding the transport and circulation of energy in the universe by observing feedback from active galactic nuclei or outflow from super-massive black holes via high-resolution spectroscopy, and 4) new science based on unprecedented high-resolution X-ray spectroscopy, such as detailed diagnostics of collisional ionization and photo-ionized plasma. To meet these scientific objectives of the XRISM mission, the spacecraft and ground systems are designed to use the X-ray micro-calorimeter array Resolve and the X-ray CCD camera Xtend on the focal planes of the X-ray mirrors, which provide X-ray spectroscopy with a high-energy resolution of ≤ 7 eV FWHM within a field of view (FOV) of 2.9 × 2.9 arcmin 2 and imaging capability with a wide FOV of 30 × 30 arcmin 2 , respectively, in the 0.3 to 12 keV band. This paper focuses on the ground systems of the XRISM mission.
In order to maximize the scientific outputs from the XRISM mission, the science operations of the mission also need to be well designed and performed properly, namely, by conducting a guest observation program operating as a public observatory under a well-supported system of guest observers and providing well-calibrated observational data in the standard format for astronomical use (i.e., flexible image transport system [FITS] format 4 ) with simple and accurate analysis environments and tools. 5 This paper aims to describe the details of the development of the XRISM Science Operations from the concept study to the detailed plans, as well as give detailed descriptions of the preparations for the operation (such as science operations manuals, tools, websites, etc) based on the SPIE Proceeding in 2020. 6 Note that such descriptions on the detail of design of the science operations may have sensitive topics for the project but the paper aims to describe those as much as possible avoiding confidential technical ideas and political issues for the XRISM project and agencies, because the authors believe that this knowledge may help the design of science operations in nearfuture high-energy missions. The rest of this paper is organized as follows. We summarize the lessons learned from past X-ray missions in Section 2 as the first step of the concept study, and summarize the concept of the operations in Section 3. In Sections 4 and 5, the team structure and the details of the science operations plan are summarized, respectively. Finally, Section 6 describes the timeline of the science operations and details of preparation of tools in the ground systems for the XRISM Science Operations, and finally we summarize this paper in Section 7.

Summary of Lessons and Their Relations
As described in Section 1, the goal of science operations is to enhance or maximize the scientific outputs of the mission. In science missions, the activities required of science operations can be divided into the following four categories. Many lessons were learned from the science operations in the series of Japanese X-ray satellites, and although some of them require no changes, others need to be addressed before the next mission. Table 1 summarizes the relations among lessons learned from the Advanced Satellite for Cosmology and Astrophysics (ASCA 7 ), Suzaku, 8 and Hitomi 2 missions, the details of which are described in Sections 2.2, 2.3, and 2.4 below. Positive and negative lessons are marked by + and identifiers, respectively. Historically, attempts were made to address negative lessons in the next mission. However, this sometimes created another negative situation, which then needed to be solved in a subsequent mission. All of the lessons learned from past X-ray missions were considered by XRISM Science Operations, which are also shown in Table 1 and summarized in Section 2.5 below. Table 1 Relations among the lessons learned from ASCA, Suzaku, and Hitomi, summarized by category (SO1, SO2, SO3, and SO4; Section 2.1). Identifiers such as 1a-ASCA + and 2ab-Suzaku + are defined in Sections 2.2, 2.3, and 2.4. The "→" mark represents that the following mission continued the activities in the column on the left.

Lessons Learned from ASCA
The ASCA mission was the fourth in the series of Japanese X-ray satellites 7 and was launched in 1993 carrying a Gas Imaging Spectrometer and Solid-state Imaging Spectrometer X-ray CCD cameras to observe astrophysical objects in the 0.5-10 keV band. The science operations activities as a public observatory were well established in almost the first collaboration between the Institute of Space and Astronautical Science (ISAS) at current JAXA and NASA/GSFC in the GO program (1a-ASCA + ) and the distribution of observation data (1b-ASCA + ), analysis software (2a-ASCA + ), GO support (3a-ASCA + ), international collaboration (4a-ASCA + ), and calibration of instruments (4b-ASCA + ), but there were also two negative items (2b-ASCA − and 3b-ASCA − ). The successful parts of ASCA are summarized below.
1a-ASCA + : The GO program worked well both in Japan and the US. GOs were able to submit their proposals to agencies, which were reviewed by the scientists and selected based on priorities, and information regarding the approved targets were used by mission operations in Japan. The basic procedures of the GO program were established.
1b-ASCA + : All data products were well managed and distributed to GOs. The backbone of the procedure for processing and archiving observation data was established.
2a-ASCA + : The core algorithms in the analysis software were well verified via onground calibration measurements before launch by instrument teams (ITs). Analysis tools using these algorithms and the calibration database were delivered to GOs. The concept was established in this mission. 3a-ASCA + : As a part of the GO program, user support activities were established.
4a-ASCA + : Collaboration between Japan and US was established on the ASCA science operations and was well organized especially on the development of the public software and the calibration database.
4b-ASCA + : The instrument team members in Japan performed ground calibrations while scientists both in Japan and US performed continuous in-orbit calibrations, which delivered good calibration accuracy.
However, the following items can be regarded as negative lessons provided by this past mission.
2b-ASCA − : The instrument team members developed their own tools for analyzing the ground calibration data, which sometimes provide better results than the public analysis software released as part of item 2a-ASCA + in the early GO phase.
Since these tools were not initially made public, they became referred to as "animal software" because of the unfairness of the analyses from the viewpoint of a public observatory, although this unfair situation was resolved in the final version of the products.
3b-ASCA − : GO support was provided only in the US by the US ASCA Guest Observer Facility (GOF), but not in Japan, although instrument teams in Japan provided deep support for the GOF activity. The interface to GOs existed only in the US.

Lessons Learned from Suzaku
The Suzaku mission was the fifth in the series of the Japanese X-ray satellites in collaboration between JAXA and NASA, 8 and was launched in 2005 carrying the High-throughput X-ray Telescope, X-ray Imaging Spectrometer CCD cameras, and non-imaging Hard X-ray Detector. The science operations members of Suzaku tried to utilize the positive lessons from ASCA (i.e., on the GO program and data distribution 1a-ASCA + and 1b-ASCA + , the software development 2a-ASCA + , the GO support 3a-ASCA + , and the PVO activities 4a-ASCA + and 4b-ASCA + ) and fix the negative situations (2b-ASCA − and 3b-ASCA − ). They successfully fixed these using 2ab-Suzaku + and 3b-Suzaku + , respectively, which are summarized below.
2ab-Suzaku + : In order to keep the positive situation 2a-ASCA + and solve negative situation 2b-ASCA − (i.e., avoiding animal software), the public tools and tools for ground calibration measurements were designed to have the core algorithms for calculating variables such as time, pulse-height invariant (PI 9 ), and grade, shared as software libraries. The instrument team members developed and verified these core libraries via hardware development, and the same libraries were smoothly exported into public tools that could be used by the GOs. Therefore, the public tools were well verified and well calibrated.
3b-Suzaku + : In order to improve situation 3b-ASCA − , a Suzaku Help Desk in Japan (RIKEN) 10 were operated in addition to the Suzaku GOF in the US. Since several members of the Suzaku Help Desk also belong to the instrument teams in Japan, these two bodies had a strong potential for solving questions from GOs very quickly because of their tight connection to the operation team and developers of instruments.
In addition, starting from Suzaku, communication was established with other X-ray missions in terms of calibration activities (keeping 4b-ASCA + ), as indicated as 4c-Suzaku + below.
4c-Suzaku + : The Suzaku instrument members participated from the beginning in crosscalibration activities in the International Astrophysical Consortium for High Energy Calibration (IACHEC). 11 However, the following two negative points related to 2ab-Suzaku + and 3b-Suzaku + arose in the Suzaku Science Operations, and were left as open issues for the next mission (Hitomi).
2c-Suzaku − : Software development by the instrument teams in 2ab-Suzaku + caused a) unexpected software freezes and b) delays in the delivery schedule, because a) not all the instrument members were experts on programming, and b) the first priority of the instrument teams was the delivery and maintenance of the detector itself, with software development having a lower priority.
3c-Suzaku − : The members of the Suzaku Help Desk in Japan (3b-Suzaku + ) were not appointed by the agency and had no special data-access permission. Therefore, the tasks were performed on a best-effort basis and sometimes activity stopped because of other business.

Lessons Learned from Hitomi
The Hitomi mission was the sixth in the series of Japanese X-ray satellites developed at JAXA in collaboration with NASA and Japanese and Canadian institutions with contribution from the ESA, 2 and carried an micro X-ray calorimeter array and X-ray CCD cameras on the focal plane of X-ray mirrors, as well as hard X-ray instruments with hard X-ray mirrors and a soft gamma-ray detector. The satellite was successfully launched in February 2016, but contact with the spacecraft was lost in March 2016 owing to problems in the bus system before the performance verification (PV) phase. Therefore, most of the science operations after launch were not activated, as indicated by 1a-Hitomi ± , 3-Hitomi ± , and 4-Hitomi ± below.
1a-Hitomi ± : Opportunity for calling for GO proposals was canceled, although the distribution of the in-orbit data was completed (keeping 1b-ASCA + ).
3-Hitomi ± : GO support helpdesks were prepared but not activated. 2c-Hitomi + : In order to avoid 2c-Suzaku − (unexpected software freeze and schedule delay), a specific team was defined for the development of software and the calibration database. The team was the Hitomi software and calibration team (SCT) and was independent from the instrument teams and consisted of scientists and programmers. As a result, there were no delays in the schedule of software preparation and no delay in the release of tools and the calibration database. The products were well calibrated using instrument-specific methods, 12-21 because all the algorithms were imported into the analysis software and the latest calibration information was quickly released in the database. 5 2d-Hitomi − : In order to achieve 2c-Hitomi + , there were many interactions among the software and calibration team, instrument teams, and operation teams, which were spread across multiple agencies. Therefore, many more tasks than expected were required in order to manage tasks for science operations such as the schedule, manpower of activities, and interfaces.

Recommendations for XRISM Science Operations
In summary, from the lessons learned from ASCA, Suzaku, and Hitomi missions, two items labeled 2d-Hitomi − (team management issues) and 3c-Suzaku − (data access rights in users support) remain as open items for the XRISM Science Operations, with the remaining items recommended to remain unchanged. The two items are related to the management of manpower and the preparation of science operations before launch.

Concept for the XRISM Science Operations
Based on the lessons learned from the past X-ray missions and recommendations for XRISM operations (Section 2), we established the XRISM Operations Concept, as described in this section.

Key points of the XRISM Operations Concept
Considering the recommendations from lessons learned from past X-ray missions (Section 2), the key points of the XRISM Operations Concept can be summarized into the following three items.
OC01 Clear division between spacecraft operations (hereafter, "mission operations") and science operations is required so that the scientists can concentrate on science operations.

OC02
The plans for the operations (both mission and science operations), including the team structure and interfaces, should be defined in an early phase before launch.
Similarly, training and actual operations should start before launch.
OC03 All members of the operations (both mission and science operations) should be appointed by the agencies, and all activities, except for PVO activities (see Sec-tion 2.1), should be performed as well-defined tasks with clear due dates, that continue to work until the end of the mission.

Task Division between Mission Operations and Science Operations
In operations concept OC01, operations tasks that require scientific decisions from the viewpoints of scientists are all assigned as XRISM Science Operations, and all other tasks are assigned as We defined individual teams for performing XRISM Mission Operations and XRISM Science Operations separately, which are called the Mission Operations Team (MOT) and Science Operations Team (SOT), respectively. Following the lessons of 2c-Hitomi + , these teams also need to be independent from the instrument teams. In addition, we defined the Science Management Office (SMO) to manage the overall XRISM Science Operations for deciding items regarding science operations. For example, the SMO handles activities such as calling for, reviewing, and selecting GO proposals, and approving targets for director time-of-opportunity (ToO) observations.

Operation Phases and Team Structure
In operations concept OC02, the operation phases of the XRISM are defined as follows. According to operations concept OC03, all members of the MOT and SOT should be appointed by the agencies (JAXA or NASA), and work on well-defined tasks under a managed schedule until the end of the mission, although members of the MOPT may be non-appointed members from universities as developers of tools in the Before PFT Phase. The SOT members consist of not only leader(s) and senior scientists, but also young scientists, referred to as Duty Scientists, who perform the actual XRISM Science Operations and are appointed by the agencies. In our concept, the tasks of the Duty Scientists should be defined such as to provide a good career path for young scientists. Note that the concept of the Duty Scientists is applied only on the science operations center in Japan as described in the next section 4.

Design of the Team and Management Structure of the XRISM Science Operations
Based on operations concepts OC01, OC02, and OC03 in Section 3, we defined the details of the structure of the SOT and the interfaces and task divisions among the subgroups of the XRISM team, which are described in this section.

Interface Structure Between Subgroups and the SOT
In addition to the SOT, MOT, and SMO described in Section 3, the XRISM team consists of the instrument teams, namely, the Resolve and Xtend teams, and the In-flight Calibration Planning Team (IFCP), 22 which provides the detailed plans for in-orbit calibration observations before launch. Interactions between these subgroups after the PFT Phase (Section 3.3) are summarized in Figure   1.  The calibration activities of payload instruments consist of many steps, and the task divisions among the SOT, instrument teams, and IFCP team are defined as Table 2.  Figure 3 in Section 4.3.

SOT Structure and Task Divisions
The XRISM Science Operations are covered by JAXA, NASA, and the ESA. Since tight collaboration between JAXA and NASA is required for preparation and maintenance of the data distribution (SO1 in Section 2.1) and analysis software and the calibration database (SO2 in Section 2.1), the SOT is designed to operate at the Science Operations Center (SOC) at JAXA and the Science Data Center (SDC) 23 at NASA, as shown in Figure 2.  The task divisions among the three centers in JAXA, NASA, and ESA are defined in Table 3, summarized into four categories (SO1, SO2, SO3, and SO4 in Section 2.1). The details of these tasks are described in the next Section 5.

Management structure
All specifications of the overall science operations are handled by the SMO, and therefore, the Mis- Following concept C03 in Section 3.1, the members marked by in Figure 3 are appointed In the SDC, more than seven staff scientists and more than four software engineers will perform the science operations at NASA. All members of the SOC and SDC are appointed by JAXA and NASA, respectively, in the Nominal Operations Phase.

Data Access Policy for Science Operations
In the science operations performed by the SOT, SOT members have access to all of the telemetry items including scientific properties in order to check the performance of the instruments and to make quick-look reports to GOs. These activities are limited to monitoring or checking of the instrument health and performance, and do not extend to performing scientific analyses of the scientific interests of scientists. The SOT members also check all the proposals approved by the SMO and their scientific justifications. While SOT members can access all the data and products to the extent that such access is required to perform their duties, they are required to maintain confidentiality of all scientific knowledge obtained in this context. The SOT members shall understand this data access policy in all of the science operations.

Details of the Science Operations Plan
Following operations concept OC02 (Section 3.1), the detailed plan of the XRISM Science Operations is constructed as described in the following sections under the team structure defined in Section 4, well before the launch during the Before PFT Phase (Section 3.3).

Summary of the Science Operations Scenario
All the tasks for the XRISM Science Operations are defined in terms of the four types of science operations defined in Section 2.1 (i.e., SO1, SO2, SO3, and SO4) in Table 4, which can be categorized into the following three-step operation flow.
Step-1: Proposal and Planning Step (before observation) Step-2: Telemetry Check and Data Processing and Archive Step (after daily spacecraft observation) Step-3: User Support and PVO Step (after distribution of the observational data to GOs) These steps are performed in parallel with observations, and are operated both by the SOT and MOT, with various timescales (once per year, monthly, weekly, daily, and continuous), as also shown in Table 4. The tasks for the SOC in Japan (see Table 3) are shared among the Duty Scientists and the SOT Scheduler (who works on planning as a contribution from SDC staying at SOC; Figures 2 and 3) evenly by week or month. For example, one Duty Scientist performs the first task, which is then performed by another Duty Scientist the following week.

Details of Tasks in Step-1 Before Observation
Most of the tasks in Step-1 before observation are of Type SO1 (defined in Section 2.1), which can be divided into the following two categories. The details are as follows.
• GO proposal support -The SOT supports calls for proposals by the SMO and receives proposals from GOs. During proposal acceptance, the SOT supports GOs with preparation of proposals (SO3). -After the review process, the SOT gets a prioritized approved target list from the SMO. In parallel, the in-orbit calibration objects are merged into the list. The SOT puts information regarding approved targets and calibration objects into the observation database and opens the list via the webpages of the researchers.
• Observation planning -After the SOT obtains the list of targets, the SOT Scheduler (defined in section 5.1) generates a long-term operation plan taking into account the spacecraft operational constraints.
-Using the long-term plan as a guide, the SOT generates a more detailed short-term observation schedule weekly and prepares the detailed plans for observations for the week.
-During preparation of the observation details, the SOT notifies the observation PI of the plan, and negotiates the hardware configuration with the instrument teams.
-In addition to the planned objects, the SOT handles ToO proposals from GOs. If the SMO approves a ToO proposal, the short-term operation plan is quickly updated and used for the spacecraft operations.
-Before spacecraft operations, the SOT acts as an interface to the MOT from SMO and GOs on scientific topics for the generation of operation commands to the spacecraft.

Details of Tasks in Step-2 After Observation
The tasks in Step-2 after observation are a mixture of Types SO1, SO2, and SO4 (Section 2.1), and can be divided into the following three categories. The details are as follows.
• Telemetry check -Telemetry from the spacecraft needs to be checked quickly after spacecraft operation. In order to quickly perform these telemetry checks before the official data processing for GOs, which takes about one or two weeks in total, a Quick-look Data Process (QLDP) is defined to generate products quickly. The QLDP simplifies the timing calibration, orbit determination, and attitude determination processes from the official data processing.
-The MOT executes the QLDP and performs the quick health checks of instruments using the housekeeping telemetry semi-automatically. This function checks every value of the attribute in the engineering housekeeping telemetry to verify the proper and safe operation of the observatory at all times. If the MOT find an anomalous telemetry for the spacecraft safety from this limit checks, they will respond immediately as an emergency operation. In any cases, the MOT reports the results to the SOT daily after the spacecraft operation.
-In addition to the engineering health checks by the MOT, further checks of the performance of payload instruments from a scientific viewpoint are also required for the SOT. The SOT uses the products from QLDP of not only the housekeeping telemetry but also the science telemetry, performs the pipeline-equivalent process to calculate data such as the time, coordinate, and energy information, and then checks the instrument performance. -When the products are archived, the SOT notifies the readiness to GOs.

Details of Tasks in Step-3 After Data Distribution
The tasks in Step-3 after data distribution are of Types SO3 and SO4 (defined in Section 2.1), which can be divided into the following two categories. The details are as follows.
• User Support -The SOT prepares and operates webpages for GOs to provide information on GO proposals, operation schedules and logs, analysis documents, etc. Such researcher website for XRISM are prepared at the three agencies, JAXA, NASA, and ESA, separately but main contents are synchronized.
-The SOT operates the agency Help Desks for handling questions from GOs.
-The SOT prepares documents related to the data analyses of XRISM, such as analysis walkthrough, analysis manuals, and descriptions of instruments.
-Education and Public Outreach (EPO) activities are performed by other institutes in JAXA or NASA, and the SOT supports such activities for XRISM.
• PVO Activities -As defined in the task division of the calibration activities in Table 2, the SOT calibrates payload instruments regularly with the instrument teams using the in-orbit calibration targets or trend archive data (i.e., non-scientific data obtained for performance monitoring, such as data during earth occultation of normal operations).
-In addition to the daily performance checks in Step-2, the SOT also monitors the instrument performance monthly.
-The SOT enhances the instrument performance (such as improving the pointing accuracy and tuning of the good time interval) by checking short-/longterm trends and correlations between telemetry items and performance parameters. The output of such performance enhancement activities are implemented as an analysis thread or a new analysis tool, which is provided to GOs via the researcher website or the software archive.
-During the daily data checks in Step-2 (Table 4)

Preparation for Science Operations on the Ground
Following the science operations plan in Section 5, the MOPT (Section 3.2) prepares science operations well before the launch along the timeline of the science operations (Section 6.1): i.e., the MOPT prepares the OTs for science operations (Section 6.2), science operations manual, and website (Section 6.3), and performs the PVO activities from before launch (Section 6.4). This section describes the preparation status at the end of the 1) Before PFT Phase (see Section 3.3) on the ground.

Timeline of the Science Operations Preparation
In each operation phases defined in Section 3.3, the MOPT and SOT prepare and/or perform the science operations following the timeline shown in Table 5

Tools for Science Operations and Detailed Designs
The tools and database required for the XRISM Science Operations by the steps (Section 5.1) are summarized in Table 6. The responsibilities for these tools/databases in the subgroups within the SOT are also shown. Among these 10 OTs, the proposal submission tools, planning tool, PL, calibration database, and analysis tools (OT01, OT02, OT06, OT07, and OT09, respectively) are developed by the SDC, and the details of these OTs are described in . 23 Hereafter, this paper describes the details of the observation database, QLDP, PPL, and archive quick-viewing tool (OT03, OT04, OT05, OT08) in Section 6.2 and the conversion tools for the researcher webpages (OT10) in Section 6.3. Table 6 List of science OTs and databases. Steps are defined in Section 5.1.

Pre-pipeline and Pipeline Process
Since the raw telemetry from the spacecraft is a collection of space packets, which are unreadable by the standard analyis tools used in high energy astronomy, they need to be converted into the standard FITS format 4 for distribution to GOs, as described in Angelini et al. (2018). 5 In addition, the GOs need calibrated information on variables such as time, coordinates, and pulse height invariant (PI; 9 energy information), which are filled in by the data processing. This corresponds to the the functions of a) format conversion and b) filling calibration columns. The data processing is divided into two steps, PPL (OT05 in Table 6) and PL (OT06 in Table 6) as shown in Figure 4 to archive functions a) and b), respectively. The raw telemetry from the spacecraft is stored in the SIRIUS database, and all the information regarding approved targets, instrument configuration, and other spacecraft information are stored in the observation database (ODB in Figure 4; OT03 in Table 6). The PPL accesses the SIRIUS database via the Space Data Transfer Protocol (SDTP) to retrieve the telemetry and first converts the telemetries into a raw packet telemetry (RPT) file, which is a simple dump of the series of space packets in the variable-length FITS format, using the information from the observation database (OT03). In the second step, the PPL interprets the telemetry attributes in the space packets using the telemetry-description database, shown as the "Spacecraft Information Base version 2 (SIB2) database" in Figure 4, and converts the RPT into the First FITS Files (FFFs) with meaningful columns. The FITS header keywords of FFFs represent the instrument configurations as identified from the telemetry and observation database. After the PPL process, the PL fills in the calibration columns, such as time, coordinates, and PI, using the FITS tools called ftools in the HEASOFT XRISM package released from HEASARC by using the calibration database (denoted as "CALDB" in Figure 4; OT07 in Table 6), and stores them in the Second FITS Files (SFFs). The PL process then continues to extract the cleaned-event FITS for analyses from the SFFs by deleting low-quality events and by selecting good-time intervals.
The key point of this procedure is that the FFFs have the same format as SFFs (i.e., FITS columns for time, coordinates, and PI are already prepared as blank columns in the FFF stage) and the CALDB and ftools are all distributed to GOs (i.e., public), so that the GOs can reprocess the SFF with the latest calibration information by themselves. This concept was established in the Suzaku Science Operations, and also used in Hitomi successfully. The XRISM data process also follows this procedure.
The PPL requires inputs from the mission operation information, such as the definition of the telemetry format, the orbital estimation, the attitude determination, the time calibration, etc. Therefore, the PPL software for the XRISM mission is prepared and executed by the SOC at JAXA, where the mission operations are performed and the operation information is easily accessible from the SOT. The FFFs are then sent via a data transfer system protocol (DTS 2 ) to the SDC, and processed in the PL at the SDC, as already described in the task division (Section 4.2).

Design of Tools for the PPL and QLDP
Since the QLDP (OT04 in Table 6; Section 5.3) is the simplified version of the PPL (OT05), these tools can be shared with each other just by switching the execution mode. The PPL and QLDP are designed to have a structure consisting of three stages of tool, modules, and top-level script, as shown in Figure 5, and the difference between PPL and QLDP is designed to be absorbed in the top-level script. A tool is the smallest unit of the software code, and a module is a collection of tools to achieve one function (for example, generation of RPT, generation of time calibration fits, etc.). The top-level script controls the process flow of multiple modules using the configuration files, with which the detail flow of PPL or QLDP are described.
Since XRISM is a recovery mission for Hitomi, the tools have already been developed and verified and can be reused for XRISM. However, the Hitomi PPL is not easy to maintain because the Hitomi SCT (section 2.4) were forced to use it during the Commissioning Phase for the unplanned spacecraft problems, and the Hitomi PPL has many patches for complex hardware modes during the Commissioning Phase, even though it was well designed for use in the Nominal Operations Phase. Therefore, the MOPT decided to re-organize the PPL flow diagram and to newly develop the modules and top-level script for XRISM.  In detail, the MOPT defined the following 14 modules corresponding to the 14 functions required for the PPL and QLDP of XRISM. Using these modules, the typical flow diagrams for the PPL and QLDP in the flight configuration are designed as shown in Figures 6 and 7, respectively.
In the QLDP, several modules are omitted in the process flow and the access point to retrieve the telemetry via SDTP is different from that for PPL, as well as the inputs for the time assignment tool and orbital-file generation tool. In addition, the MOPT also identified 17 use cases for the ground tests and operations in orbit.

Design of Tools for the Archive Quick-Viewing Tool
For the data archive for XRISM, it is important to define the division of tasks between the XRISM project and the archive centers of the agencies. In the archive activity at JAXA, the MOPT defined the task division between the SOT and the Center for Science Satellite Operation and Data Archive (C-SODA) at ISAS/JAXA, as summarized in Table 7. In principle, content is provided by the XRISM project and preparation of mission-independent systems and infrastructure are made by C-SODA at ISAS/JAXA.  Figure 6, but for QLDP. Gray colors represent the modules omitted in QLDP.
Among the tasks by the SOT, the data preparation tasks (Table 7) are performed by the PPL and related tools OT05, and the project introduction page and public data list tasks are performed manually by the SOT. Therefore, additional OTs for the archive activity are a generation tool for a) metadata for data search and b) hierarchical progressive survey (HiPS) data for quick viewing, which are identified as OT08 in Table 6. Table 7 List of tasks for archiving XRISM data at JAXA and division of tasks between SOT and C-SODA.

Preparation for User Support
Researcher webpages are required for communication with GOs for the user-support activities listed in Table 4, and are planned to be operated in three centers: SOC, SDC, and ESAC. In the first version, the following content is listed on the researcher webpages at SOC.
• Top page, News and Announcements • About XRISM (XRISM documents, workshops, publication list, resources) • Proposer (GO proposal documents, response files, generic ToO request, approved target list) • Observers (short-term/long-term operation plan, spacecraft operation log) • Analysis (manual, link to archive web, link to download page for software/calibration database) • XRISM Help Desk (FAQ, proposal plan support, analysis questions, XRISM workshops) • Useful links (link to general public XRISM website, DARTS archive website, HEASARC website, ESAC website) The MOPT prepares the web servers and the tools for filling the content of the pages of observation plan and spacecraft operation log semi-automatically. These tools are identified as OT10 in Table 6. The JAXA researcher webpage was opened on 1 November 2020 at https://xrism.isas.jaxa.jp/ and is used for announcements to GOs before launch and is to be activated on the science operations after launch.

Preparation of PVO Activities
In principle, all the PVO activities are performed by all the science members of the XRISM team before launch. The items for the MOPT to prepare for the science operations in orbit are the detailed procedure for opening these efforts to GOs via the XRISM software, calibration database, and the analysis method, which are already covered in Section 5.
In order to perform the four science operations tasks described in Section 5.4 and Table 4, the MOPT prepares the following items.

• Calibration analyses
As defined in Table 2, the in-orbit calibration items and procedures are prepared by the instrument teams, and the SOT also analyzes the plan to observe the inorbit calibration observations with the instrument teams. Therefore, the MOPT prepares the training procedure for understanding the calibration items and procedures with the instrument team before launch.
• Monthly performance check Daily and monthly checks of instrument performance require no special tools other than the standard analysis software. In this sense, the MOPT has no plan to prepare the tools before launch. If the MOPT identifies additional tools during the rehearsal of instrument operation on ground in the PFT Phase (Section 3.3), the MOPT will prepare the tools from this phase.
• Development of analysis threads and tools All of the standard analysis will be performed using the public standard tools (OT08 in Table 6). For the monthly or daily performance checks, the SOT tries to study and identify new proprieties or behaviors of instruments which affect the instrument performance. If the SOT finds a way to enhance the instrument performance using these items, the SOT will implement the procedure as an analysis thread or prepare a new public tool using the newly found algorithm.
• Xtend transient search MOPT prepares the detailed procedure for this operation to obtain a quick response and the automatic search tool of transients.

Summary
In preparation of science operations of the XRISM mission, we reviewed the lessons learned from past X-ray missions in Section 2 to identify recommendations for the XRISM Science Operations (Section 2.5), which are considered as part of the operations concept (Section 3). Based on the operations concepts, we designed the structure of the SOT, interfaces among subgroups, management structure, and data policy in Section 4 and established a detailed plan of the science operations as described in Section 5. As the final step of preparation of science operations, we identified 10 OTs and developed them as summarized in Section 6 before launch.