diff --git a/client/src/app/admin/components/attribute/criteria/tr-criteria.component.html b/client/src/app/admin/components/attribute/criteria/tr-criteria.component.html index 60a63b3507183345265e83b6591f73d4ad63cf23..7fbb36204dfc89419444d383d49eb33bb24ceaa0 100644 --- a/client/src/app/admin/components/attribute/criteria/tr-criteria.component.html +++ b/client/src/app/admin/components/attribute/criteria/tr-criteria.component.html @@ -29,6 +29,7 @@ && form.controls.search_type.value != 'between' && form.controls.search_type.value != 'between-date' && form.controls.search_type.value != 'json' + && form.controls.search_type.value != 'svom_json_kw' && form.controls.search_type.value != 'list'" class="form-control" name="operator" diff --git a/client/src/app/instance/instance.reducer.ts b/client/src/app/instance/instance.reducer.ts index 2c3b3c970e64e3c185933ae2cd8f57515fe97bd8..062c160c5fe4f3fa84539d5e9665a2b5c299f5e5 100644 --- a/client/src/app/instance/instance.reducer.ts +++ b/client/src/app/instance/instance.reducer.ts @@ -15,6 +15,7 @@ import * as searchMultiple from './store/reducers/search-multiple.reducer'; import * as samp from './store/reducers/samp.reducer'; import * as coneSearch from './store/reducers/cone-search.reducer'; import * as detail from './store/reducers/detail.reducer'; +import * as svomJsonKw from './store/reducers/svom-json-kw.reducer'; /** * Interface for instance state. @@ -26,7 +27,8 @@ export interface State { searchMultiple: searchMultiple.State, samp: samp.State, coneSearch: coneSearch.State - detail: detail.State + detail: detail.State, + svomJsonKw: svomJsonKw.State } const reducers = { @@ -34,7 +36,8 @@ const reducers = { searchMultiple: searchMultiple.searchMultipleReducer, samp: samp.sampReducer, coneSearch: coneSearch.coneSearchReducer, - detail: detail.detailReducer + detail: detail.detailReducer, + svomJsonKw: svomJsonKw.svomJsonKwReducer }; export const instanceReducer = combineReducers(reducers); diff --git a/client/src/app/instance/search/components/criteria/criteria-by-family.component.html b/client/src/app/instance/search/components/criteria/criteria-by-family.component.html index 08f385e6d3361791bd67c7e2ae7f2ec88dfddbea..d7fa428fe7c4f09e812f595287699e40f4e9534f 100644 --- a/client/src/app/instance/search/components/criteria/criteria-by-family.component.html +++ b/client/src/app/instance/search/components/criteria/criteria-by-family.component.html @@ -143,6 +143,19 @@ (deleteCriterion)="emitDelete($event)"> </app-json-criteria> </div> + <div *ngSwitchCase="'svom_json_kw'"> + <app-svom-json-kw-criteria class="criteria" + [id]="attribute.id" + [label]="attribute.form_label" + [criterion]="getCriterion(attribute.id)" + [criteriaList]="criteriaList" + [svomKeywords]="svomKeywords" + (selectSvomAcronym)=selectSvomAcronym.emit($event) + (resetSvomKeywords)="resetSvomKeywords.emit()" + (addCriterion)="emitAdd($event)" + (deleteCriterion)="emitDelete($event)"> + </app-svom-json-kw-criteria> + </div> <div *ngSwitchDefault> {{ attribute.search_type }} search type not supported </div> diff --git a/client/src/app/instance/search/components/criteria/criteria-by-family.component.spec.ts b/client/src/app/instance/search/components/criteria/criteria-by-family.component.spec.ts index d019066be3820edf7c619ca5bb5d8bcc315df93f..946737df076868a875e58eb60225d2e6f9c2989a 100644 --- a/client/src/app/instance/search/components/criteria/criteria-by-family.component.spec.ts +++ b/client/src/app/instance/search/components/criteria/criteria-by-family.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CriteriaByFamilyComponent } from './criteria-by-family.component'; import { Option } from '../../../../metamodel/models'; -import { Criterion, FieldCriterion } from '../../../store/models'; +import { Criterion, FieldCriterion, SvomKeyword } from '../../../store/models'; describe('[Instance][Search][Component][Criteria] CriteriaByFamilyComponent', () => { @Component({ selector: 'app-field', template: '' }) @@ -123,6 +123,15 @@ describe('[Instance][Search][Component][Criteria] CriteriaByFamilyComponent', () @Input() criterion: Criterion; } + @Component({ selector: 'app-svom-json-kw-criteria', template: '' }) + class SvomJsonStubKwComponent { + @Input() id: number; + @Input() label: string; + @Input() criterion: Criterion; + @Input() criteriaList: Criterion[]; + @Input() svomKeywords: SvomKeyword[]; + } + let component: CriteriaByFamilyComponent; let fixture: ComponentFixture<CriteriaByFamilyComponent>; @@ -142,7 +151,8 @@ describe('[Instance][Search][Component][Criteria] CriteriaByFamilyComponent', () BetweenDateStubComponent, TimeStubComponent, DatetimeStubComponent, - JsonStubComponent + JsonStubComponent, + SvomJsonStubKwComponent ] }); fixture = TestBed.createComponent(CriteriaByFamilyComponent); diff --git a/client/src/app/instance/search/components/criteria/criteria-by-family.component.ts b/client/src/app/instance/search/components/criteria/criteria-by-family.component.ts index ebfbed20ab4eb9279ea140e8c4bcaf0f69553529..e64b8eb0207828546d82bb13bd1a1f19104759c2 100644 --- a/client/src/app/instance/search/components/criteria/criteria-by-family.component.ts +++ b/client/src/app/instance/search/components/criteria/criteria-by-family.component.ts @@ -9,7 +9,7 @@ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core'; -import { Criterion } from '../../../store/models'; +import { Criterion, SvomKeyword } from '../../../store/models'; import { Attribute, Option } from 'src/app/metamodel/models'; /** @@ -24,6 +24,9 @@ import { Attribute, Option } from 'src/app/metamodel/models'; export class CriteriaByFamilyComponent { @Input() attributeList: Attribute[]; @Input() criteriaList: Criterion[]; + @Input() svomKeywords: SvomKeyword[]; + @Output() selectSvomAcronym: EventEmitter<string> = new EventEmitter(); + @Output() resetSvomKeywords: EventEmitter<{}> = new EventEmitter(); @Output() addCriterion: EventEmitter<Criterion> = new EventEmitter(); @Output() deleteCriterion: EventEmitter<number> = new EventEmitter(); diff --git a/client/src/app/instance/search/components/criteria/criteria-tabs.component.html b/client/src/app/instance/search/components/criteria/criteria-tabs.component.html index fa9d3aef3286c6ac5d3fb9cdd32279b4c00f2d3b..d659ea65ae3b65a642451ce7f58b955ff7a0e342 100644 --- a/client/src/app/instance/search/components/criteria/criteria-tabs.component.html +++ b/client/src/app/instance/search/components/criteria/criteria-tabs.component.html @@ -16,6 +16,9 @@ <app-criteria-by-family [attributeList]="attributeList | attributeListByFamily:family.id" [criteriaList]="criteriaList" + [svomKeywords]="svomKeywords" + (selectSvomAcronym)="selectSvomAcronym.emit($event)" + (resetSvomKeywords)="resetSvomKeywords.emit()" (addCriterion)="emitAdd($event)" (deleteCriterion)="emitDelete($event)"> </app-criteria-by-family> diff --git a/client/src/app/instance/search/components/criteria/criteria-tabs.component.spec.ts b/client/src/app/instance/search/components/criteria/criteria-tabs.component.spec.ts index b2557821f8e1361874a432af5b41a053f767890d..11b0bca600500357f1a65c3d94faf70aabdf8649 100644 --- a/client/src/app/instance/search/components/criteria/criteria-tabs.component.spec.ts +++ b/client/src/app/instance/search/components/criteria/criteria-tabs.component.spec.ts @@ -6,7 +6,7 @@ import { AccordionModule } from 'ngx-bootstrap/accordion'; import { CriteriaTabsComponent } from './criteria-tabs.component'; import { Attribute } from '../../../../metamodel/models'; -import { Criterion, FieldCriterion } from '../../../store/models'; +import { Criterion, FieldCriterion, SvomKeyword } from '../../../store/models'; import { AttributeListByFamilyPipe } from '../../../../shared/pipes/attribute-list-by-family.pipe'; describe('[Instance][Search][Component][Criteria] CriteriaTabsComponent', () => { @@ -14,6 +14,7 @@ describe('[Instance][Search][Component][Criteria] CriteriaTabsComponent', () => class CriteriaByFamilyStubComponent { @Input() attributeList: Attribute[]; @Input() criteriaList: Criterion[]; + @Input() svomKeywords: SvomKeyword[]; } let component: CriteriaTabsComponent; diff --git a/client/src/app/instance/search/components/criteria/criteria-tabs.component.ts b/client/src/app/instance/search/components/criteria/criteria-tabs.component.ts index a7c45275faa2fd646154798bc4b8d6d0f1ec5f10..7ed5b94db60583441a66718f4b014ec8a350f8e5 100644 --- a/client/src/app/instance/search/components/criteria/criteria-tabs.component.ts +++ b/client/src/app/instance/search/components/criteria/criteria-tabs.component.ts @@ -9,7 +9,7 @@ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core'; -import { Criterion } from '../../../store/models'; +import { Criterion, SvomKeyword } from '../../../store/models'; import { CriteriaFamily, Attribute } from 'src/app/metamodel/models'; /** @@ -25,6 +25,9 @@ export class CriteriaTabsComponent { @Input() attributeList: Attribute[]; @Input() criteriaFamilyList: CriteriaFamily[]; @Input() criteriaList: Criterion[]; + @Input() svomKeywords: SvomKeyword[]; + @Output() selectSvomAcronym: EventEmitter<string> = new EventEmitter(); + @Output() resetSvomKeywords: EventEmitter<{}> = new EventEmitter(); @Output() addCriterion: EventEmitter<Criterion> = new EventEmitter(); @Output() deleteCriterion: EventEmitter<number> = new EventEmitter(); diff --git a/client/src/app/instance/search/components/criteria/search-type/index.ts b/client/src/app/instance/search/components/criteria/search-type/index.ts index 6f24be8c32abd823a87d16087c74003603233e32..8f832508f107af062d6820ccd1b65678360c663e 100644 --- a/client/src/app/instance/search/components/criteria/search-type/index.ts +++ b/client/src/app/instance/search/components/criteria/search-type/index.ts @@ -11,6 +11,7 @@ import { BetweenDateComponent } from './between-date.component'; import { TimeComponent } from './time.component'; import { DatetimeComponent } from './datetime.component'; import { JsonComponent } from './json.component'; +import { SvomJsonKwComponent } from './svom-json-kw.component'; import { OperatorComponent } from './operator.component'; import { HelpLikeComponent } from './help-like.component'; @@ -28,6 +29,7 @@ export const searchTypeComponents = [ TimeComponent, DatetimeComponent, JsonComponent, + SvomJsonKwComponent, OperatorComponent, HelpLikeComponent ]; diff --git a/client/src/app/instance/search/components/criteria/search-type/json.component.html b/client/src/app/instance/search/components/criteria/search-type/json.component.html index 8d69dac7d08c4e7d15d27433e8cda7129e05ccfb..3780ed1fbc2f24f1194b99e89a304c72005c7908 100644 --- a/client/src/app/instance/search/components/criteria/search-type/json.component.html +++ b/client/src/app/instance/search/components/criteria/search-type/json.component.html @@ -8,14 +8,13 @@ </div> <div class="w-100 d-block d-sm-none"></div> <div class="col col-sm-auto mb-1 mb-sm-0 px-sm-0"> - <select class="custom-select" id="operator" name="operator" formControlName="operator"> - <option></option> - <option value="eq">=</option> - <option value="gt">></option> - <option value="gte">>=</option> - <option value="lt"><</option> - <option value="lte"><=</option> - </select> + <ng-select [clearable]="false" [multiple]="false" [hideSelected]="true" class="ng-select-custom" formControlName="operator"> + <ng-option value="eq">=</ng-option > + <ng-option value="gt">></ng-option > + <ng-option value="gte">>=</ng-option > + <ng-option value="lt"><</ng-option > + <ng-option value="lte"><=</ng-option > + </ng-select> </div> <div class="w-100 d-block d-sm-none"></div> <div class="col"> diff --git a/client/src/app/instance/search/components/criteria/search-type/json.component.spec.ts b/client/src/app/instance/search/components/criteria/search-type/json.component.spec.ts index 6941d1178975af0f51ce2abd9358ab0d873204ed..673739f3f74f1f5c918828186d1bee27709d0c07 100644 --- a/client/src/app/instance/search/components/criteria/search-type/json.component.spec.ts +++ b/client/src/app/instance/search/components/criteria/search-type/json.component.spec.ts @@ -2,6 +2,8 @@ import { Component, ViewChild } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { NgSelectModule } from '@ng-select/ng-select'; + import { JsonComponent } from './json.component'; import { JsonCriterion } from '../../../../store/models/criterion'; @@ -35,7 +37,8 @@ describe('[Instance][Search][Component][Criteria][SearchType] JsonComponent', () ], imports: [ FormsModule, - ReactiveFormsModule + ReactiveFormsModule, + NgSelectModule ] }); testHostFixture = TestBed.createComponent(TestHostComponent); diff --git a/client/src/app/instance/search/components/criteria/search-type/svom-json-kw.component.html b/client/src/app/instance/search/components/criteria/search-type/svom-json-kw.component.html new file mode 100644 index 0000000000000000000000000000000000000000..7257b9970af74837ca086afe11c8d033c5b5045a --- /dev/null +++ b/client/src/app/instance/search/components/criteria/search-type/svom-json-kw.component.html @@ -0,0 +1,37 @@ +<form [formGroup]="form" novalidate> + <div class="row"> + <div class="col form-group"> + <label>{{ label }}</label> + <div class="row"> + <div class="col mb-1 mb-sm-0"> + <input *ngIf="svomKeywords.length < 1" class="form-control" id="path" name="path" placeholder="Path" autocomplete="off" formControlName="path"> + <ng-select *ngIf="svomKeywords.length > 0" [multiple]="false" [hideSelected]="true" placeholder="Select svom product keyword" class="ng-select-custom" formControlName="path"> + <ng-option *ngFor="let svomKeyword of svomKeywords" [value]="getKeywordValue(svomKeyword)">{{ svomKeyword.extension }}/{{ svomKeyword.name }}</ng-option> + </ng-select> + </div> + <div class="w-100 d-block d-sm-none"></div> + <div class="col col-sm-auto mb-1 mb-sm-0 px-sm-0"> + <ng-select [clearable]="false" [multiple]="false" [hideSelected]="true" class="ng-select-custom" formControlName="operator"> + <ng-option value="eq">=</ng-option > + <ng-option value="gt">></ng-option > + <ng-option value="gte">>=</ng-option > + <ng-option value="lt"><</ng-option > + <ng-option value="lte"><=</ng-option > + </ng-select> + </div> + <div class="w-100 d-block d-sm-none"></div> + <div class="col"> + <input class="form-control" id="value" name="value" placeholder="Value" autocomplete="off" formControlName="value"> + </div> + </div> + </div> + <div class="col-2 text-center align-self-end pb-3"> + <button class="btn btn-outline-success" *ngIf="!form.disabled" [hidden]="!form.valid" (click)="emitAdd()"> + <span class="fas fa-plus fa-fw"></span> + </button> + <button class="btn btn-outline-danger" *ngIf="form.disabled" (click)="deleteCriterion.emit(id)"> + <span class="fa fa-times fa-fw"></span> + </button> + </div> + </div> +</form> diff --git a/client/src/app/instance/search/components/criteria/search-type/svom-json-kw.component.spec.ts b/client/src/app/instance/search/components/criteria/search-type/svom-json-kw.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..05f55eec0e209ff39dc6559c31db1c4b60a81554 --- /dev/null +++ b/client/src/app/instance/search/components/criteria/search-type/svom-json-kw.component.spec.ts @@ -0,0 +1,93 @@ +import { Component, ViewChild } from '@angular/core'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; + +import { NgSelectModule } from '@ng-select/ng-select'; + +import { SvomJsonKwComponent } from './svom-json-kw.component'; +import { Criterion, JsonCriterion, SvomKeyword } from '../../../../store/models'; + +describe('[Instance][Search][Component][Criteria][SearchType] SvomJsonKwComponent', () => { + @Component({ + selector: `app-host`, + template: ` + <app-svom-json-kw-criteria + [id]="id" + [label]="label" + [criterion]="criterion" + [criteriaList]="criteriaList" + [svomKeywords]="svomKeywords"> + </app-svom-json-kw-criteria >` + }) + class TestHostComponent { + @ViewChild(SvomJsonKwComponent, { static: false }) + public testedComponent: SvomJsonKwComponent; + public id: number = undefined; + public label: string = undefined; + public criterion: JsonCriterion = undefined; + public criteriaList: Criterion[] = []; + public svomKeywords: SvomKeyword[] = []; + } + + let testHostComponent: TestHostComponent; + let testHostFixture: ComponentFixture<TestHostComponent>; + let testedComponent: SvomJsonKwComponent; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [ + SvomJsonKwComponent, + TestHostComponent + ], + imports: [ + FormsModule, + ReactiveFormsModule, + NgSelectModule + ] + }); + testHostFixture = TestBed.createComponent(TestHostComponent); + testHostComponent = testHostFixture.componentInstance; + testHostFixture.detectChanges(); + testedComponent = testHostComponent.testedComponent; + }); + + it('should create the component', () => { + expect(testedComponent).toBeTruthy(); + }); + + it('should call ngOnChanges and apply changes', () => { + const spy = jest.spyOn(testedComponent, 'ngOnChanges'); + testHostComponent.criterion = { id: testedComponent.id, type: 'json', path: 'myPath', operator: 'myOperator', value: 'myValue' } as JsonCriterion; + testHostFixture.detectChanges(); + expect(testedComponent.form.controls.path.value).toEqual('myPath'); + expect(testedComponent.form.controls.operator.value).toEqual('myOperator'); + expect(testedComponent.form.controls.value.value).toEqual('myValue'); + expect(testedComponent.form.disabled).toBeTruthy(); + testHostComponent.criterion = undefined; + testHostFixture.detectChanges(); + expect(testedComponent.form.controls.path.value).toBeNull(); + expect(testedComponent.form.controls.operator.value).toBeNull(); + expect(testedComponent.form.controls.value.value).toBeNull(); + expect(testedComponent.form.enabled).toBeTruthy(); + expect(spy).toHaveBeenCalledTimes(2); + }); + + it('raises the add criterion event when clicked', () => { + testedComponent.id = 1; + testedComponent.form.controls.path.setValue('myPath'); + testedComponent.form.controls.operator.setValue('myOperator'); + testedComponent.form.controls.value.setValue('myValue'); + const expectedCriterion = { id: testedComponent.id, type: 'json', path: 'myPath', operator: 'myOperator', value: 'myValue' } as JsonCriterion; + testedComponent.addCriterion.subscribe((event: JsonCriterion) => expect(event).toEqual(expectedCriterion)); + testedComponent.emitAdd(); + }); + + it('Calculates the value of ng-option', () => { + expect(testedComponent.getKeywordValue({ + extension: 'PrimaryHDU', + name: 'CARD', + data_type: 'string', + default: '' + })).toEqual('PrimaryHDU,CARD'); + }); +}); diff --git a/client/src/app/instance/search/components/criteria/search-type/svom-json-kw.component.ts b/client/src/app/instance/search/components/criteria/search-type/svom-json-kw.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..9feb30f53132906618468ce6fe3452a4b97b4ec2 --- /dev/null +++ b/client/src/app/instance/search/components/criteria/search-type/svom-json-kw.component.ts @@ -0,0 +1,76 @@ +/** + * This file is part of Anis Client. + * + * @copyright Laboratoire d'Astrophysique de Marseille / CNRS + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy, OnChanges, SimpleChanges } from '@angular/core'; +import { FormGroup, FormControl, Validators } from '@angular/forms'; + +import { JsonCriterion, Criterion, SvomKeyword } from 'src/app/instance/store/models'; + +@Component({ + selector: 'app-svom-json-kw-criteria', + templateUrl: 'svom-json-kw.component.html', + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class SvomJsonKwComponent implements OnChanges { + @Input() id: number; + @Input() label: string; + @Input() criterion: Criterion; + @Input() criteriaList: Criterion[]; + @Input() svomKeywords: SvomKeyword[]; + @Output() selectSvomAcronym: EventEmitter<string> = new EventEmitter(); + @Output() resetSvomKeywords: EventEmitter<{}> = new EventEmitter(); + @Output() addCriterion: EventEmitter<JsonCriterion> = new EventEmitter(); + @Output() deleteCriterion: EventEmitter<number> = new EventEmitter(); + + public form = new FormGroup({ + path: new FormControl('', [Validators.required]), + operator: new FormControl('', [Validators.required]), + value: new FormControl('', [Validators.required]) + }); + + ngOnChanges(changes: SimpleChanges): void { + if (changes.criterion && changes.criterion.currentValue) { + this.form.patchValue(changes.criterion.currentValue); + this.form.disable(); + } + + if (changes.criterion && !changes.criterion.currentValue) { + this.form.enable(); + this.form.reset(); + } + + if (changes.criteriaList && this.svomKeywords.length < 1 && changes.criteriaList.currentValue.find((c: Criterion) => c.id === 3)) { + this.selectSvomAcronym.emit(changes.criteriaList.currentValue.find((c: Criterion) => c.id === 3).value); + } + + if (changes.criteriaList && this.svomKeywords.length > 0 && !changes.criteriaList.currentValue.find((c: Criterion) => c.id === 3)) { + this.resetSvomKeywords.emit(); + } + } + + /** + * Transform a SVOM json Keyword to as path value (anis json search) + * + * @param svomKeyword Keyword selected by user + * @returns string path value + */ + getKeywordValue(svomKeyword: SvomKeyword): string { + return `${svomKeyword.extension},${svomKeyword.name}` + } + + /** + * Emits event to add criterion to the criteria list. + * + * @fires EventEmitter<JsonCriterion> + */ + emitAdd(): void { + const js = { id: this.id, type: 'json', ...this.form.value }; + this.addCriterion.emit(js); + } +} diff --git a/client/src/app/instance/search/containers/criteria.component.html b/client/src/app/instance/search/containers/criteria.component.html index 0afddb0a5e155f3d9a8aa4784abb75de57670e2b..c24a1901fe0ca6198428e4f0be0c9e85933d1177 100644 --- a/client/src/app/instance/search/containers/criteria.component.html +++ b/client/src/app/instance/search/containers/criteria.component.html @@ -22,6 +22,9 @@ [attributeList]="attributeList | async | sortByCriteriaDisplay" [criteriaFamilyList]="criteriaFamilyList | async" [criteriaList]="criteriaList | async" + [svomKeywords]="svomKeywords | async" + (selectSvomAcronym)="selectSvomAcronym($event)" + (resetSvomKeywords)="resetSvomKeywords()" (addCriterion)="addCriterion($event)" (deleteCriterion)="deleteCriterion($event)"> </app-criteria-tabs> diff --git a/client/src/app/instance/search/containers/criteria.component.spec.ts b/client/src/app/instance/search/containers/criteria.component.spec.ts index a1c1e2eb5202c9b8c9b3417add3eedafcff32595..035339c21739e54e00efae74b15c2363a7560472 100644 --- a/client/src/app/instance/search/containers/criteria.component.spec.ts +++ b/client/src/app/instance/search/containers/criteria.component.spec.ts @@ -6,7 +6,7 @@ import { MockStore, provideMockStore } from '@ngrx/store/testing'; import { CriteriaComponent } from './criteria.component'; import { Attribute, CriteriaFamily, Dataset, OutputCategory, OutputFamily } from '../../../metamodel/models'; -import { ConeSearch, Criterion, Resolver, SearchQueryParams } from '../../store/models'; +import { ConeSearch, Criterion, Resolver, SearchQueryParams, SvomKeyword } from '../../store/models'; import { SortByCriteriaDisplayPipe } from '../pipes/sort-by-criteria-display.pipe'; import * as searchActions from '../../store/actions/search.actions'; import { AbstractSearchComponent } from './abstract-search.component'; @@ -31,6 +31,7 @@ describe('[Instance][Search][Container] CriteriaComponent', () => { @Input() attributeList: Attribute[]; @Input() criteriaFamilyList: CriteriaFamily[]; @Input() criteriaList: Criterion[]; + @Input() svomKeywords: SvomKeyword[]; } @Component({ selector: 'app-summary', template: '' }) diff --git a/client/src/app/instance/search/containers/criteria.component.ts b/client/src/app/instance/search/containers/criteria.component.ts index 2530489e8fbbbe638e656bf04bab072526cf232f..a73921a9fd50efacaf32576f09a219d06e8cf258 100644 --- a/client/src/app/instance/search/containers/criteria.component.ts +++ b/client/src/app/instance/search/containers/criteria.component.ts @@ -13,10 +13,12 @@ import { Store } from '@ngrx/store'; import { Observable } from 'rxjs'; import { AbstractSearchComponent } from './abstract-search.component'; -import { ConeSearch, Criterion, Resolver } from '../../store/models'; +import { ConeSearch, Criterion, Resolver, SvomKeyword } from '../../store/models'; import * as searchActions from '../../store/actions/search.actions'; import * as coneSearchActions from '../../store/actions/cone-search.actions'; import * as coneSearchSelector from '../../store/selectors/cone-search.selector'; +import * as svomJsonKwActions from '../../store/actions/svom-json-kw.actions'; +import * as svomJsonKwSelector from '../../store/selectors/svom-json-kw.selector'; /** * @class @@ -30,12 +32,14 @@ export class CriteriaComponent extends AbstractSearchComponent { public resolver: Observable<Resolver>; public resolverIsLoading: Observable<boolean>; public resolverIsLoaded: Observable<boolean>; + public svomKeywords: Observable<SvomKeyword[]>; constructor(protected store: Store<{ }>) { super(store); this.resolver = this.store.select(coneSearchSelector.selectResolver); this.resolverIsLoading = this.store.select(coneSearchSelector.selectResolverIsLoading); this.resolverIsLoaded = this.store.select(coneSearchSelector.selectResolverIsLoaded); + this.svomKeywords = this.store.select(svomJsonKwSelector.selectSvomKeywords); } ngOnInit(): void { @@ -88,4 +92,12 @@ export class CriteriaComponent extends AbstractSearchComponent { retrieveCoordinates(name: string): void { this.store.dispatch(coneSearchActions.retrieveCoordinates({ name })); } + + selectSvomAcronym(acronymSelected: string): void { + this.store.dispatch(svomJsonKwActions.selectAcronym({ acronymSelected })); + } + + resetSvomKeywords(): void { + Promise.resolve(null).then(() => this.store.dispatch(svomJsonKwActions.resetKw())); + } } diff --git a/client/src/app/instance/store/actions/svom-json-kw.actions.ts b/client/src/app/instance/store/actions/svom-json-kw.actions.ts new file mode 100644 index 0000000000000000000000000000000000000000..4ce485e9783ec82278d2d63a98a4fd2f089bde48 --- /dev/null +++ b/client/src/app/instance/store/actions/svom-json-kw.actions.ts @@ -0,0 +1,18 @@ +/** + * This file is part of Anis Client. + * + * @copyright Laboratoire d'Astrophysique de Marseille / CNRS + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +import { createAction, props } from '@ngrx/store'; + +import { SvomKeyword } from '../models'; + +export const resetKw = createAction('[SVOM Json Kw] Reset Kw'); +export const selectAcronym = createAction('[SVOM Json Kw] Select Acronym', props<{ acronymSelected: string }>()); +export const loadKwSearchable = createAction('[SVOM Json Kw] Load Kw Searchable'); +export const loadKwSearchableSuccess = createAction('[SVOM Json Kw] Load Kw Searchable Success', props<{ svomKeywords: SvomKeyword[] }>()); +export const loadKwSearchableFail = createAction('[SVOM Json Kw] Load Kw Searchable Fail'); \ No newline at end of file diff --git a/client/src/app/instance/store/effects/index.ts b/client/src/app/instance/store/effects/index.ts index 582dd51102f0f5b76cdf2db4ff4fd0e3e36307b6..69b9a3b26cc0cd09cc16e974cbb4ddc4102571b9 100644 --- a/client/src/app/instance/store/effects/index.ts +++ b/client/src/app/instance/store/effects/index.ts @@ -3,11 +3,13 @@ import { SearchEffects } from './search.effects'; import { SearchMultipleEffects } from './search-multiple.effects'; import { ConeSearchEffects } from './cone-search.effects'; import { DetailEffects } from './detail.effects'; +import { SvomJsonKwEffects } from './svom-json-kw.effects'; export const instanceEffects = [ SampEffects, SearchEffects, SearchMultipleEffects, ConeSearchEffects, - DetailEffects + DetailEffects, + SvomJsonKwEffects ]; diff --git a/client/src/app/instance/store/effects/svom-json-kw.effects.spec.ts b/client/src/app/instance/store/effects/svom-json-kw.effects.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..ed3ca655f9ce922c6c0f93729243897bbb2eaf07 --- /dev/null +++ b/client/src/app/instance/store/effects/svom-json-kw.effects.spec.ts @@ -0,0 +1,44 @@ +import { TestBed } from '@angular/core/testing'; + +import { provideMockActions } from '@ngrx/effects/testing'; +import { EffectsMetadata, getEffectsMetadata } from '@ngrx/effects'; +import { provideMockStore } from '@ngrx/store/testing'; +import { Observable } from 'rxjs'; +import { ToastrService } from 'ngx-toastr'; + +import { SvomJsonKwEffects } from './svom-json-kw.effects'; +import { SvomJsonKwService } from '../services/svom-json-kw.service'; +import * as fromSvomJsonKw from '../reducers/svom-json-kw.reducer'; + +describe('[Instance][Store] SvomJsonKwEffects', () => { + let actions = new Observable(); + let effects: SvomJsonKwEffects; + let metadata: EffectsMetadata<SvomJsonKwEffects>; + let svomJsonKwService: SvomJsonKwService; + let toastr: ToastrService; + const initialState = { + instance: { + svomJsonKw: { ...fromSvomJsonKw.initialState } + } + }; + + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [ + SvomJsonKwEffects, + { provide: SvomJsonKwService, useValue: { loadKwSearchable: jest.fn() }}, + { provide: ToastrService, useValue: { success: jest.fn(), error: jest.fn() }}, + provideMockActions(() => actions), + provideMockStore({ initialState }) + ] + }).compileComponents(); + effects = TestBed.inject(SvomJsonKwEffects); + metadata = getEffectsMetadata(effects); + svomJsonKwService = TestBed.inject(SvomJsonKwService); + toastr = TestBed.inject(ToastrService); + }); + + it('should be created', () => { + expect(effects).toBeTruthy(); + }); +}); diff --git a/client/src/app/instance/store/effects/svom-json-kw.effects.ts b/client/src/app/instance/store/effects/svom-json-kw.effects.ts new file mode 100644 index 0000000000000000000000000000000000000000..c6d32c75943ed0bd426e1476dbf21ded68578c5d --- /dev/null +++ b/client/src/app/instance/store/effects/svom-json-kw.effects.ts @@ -0,0 +1,71 @@ +/** + * This file is part of Anis Client. + * + * @copyright Laboratoire d'Astrophysique de Marseille / CNRS + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +import { Injectable } from '@angular/core'; + +import { Actions, createEffect, ofType, concatLatestFrom } from '@ngrx/effects'; +import { Store } from '@ngrx/store'; +import { of } from 'rxjs'; +import { map, tap, mergeMap, catchError } from 'rxjs/operators'; +import { ToastrService } from 'ngx-toastr'; + +import * as svomJsonKwActions from '../actions/svom-json-kw.actions'; +import * as svomJsonKwSelector from '../selectors/svom-json-kw.selector'; + +import { SvomJsonKwService } from '../services/svom-json-kw.service'; + +/** + * @class + * @classdesc Svom Json Kw effects. + */ +@Injectable() +export class SvomJsonKwEffects { + selectAcronym$ = createEffect((): any => + this.actions$.pipe( + ofType(svomJsonKwActions.selectAcronym), + map(() => svomJsonKwActions.loadKwSearchable()) + ) + ); + + loadKwSearchable$ = createEffect(() => + this.actions$.pipe( + ofType(svomJsonKwActions.loadKwSearchable), + concatLatestFrom(() => this.store.select(svomJsonKwSelector.selectAcronymSelected)), + mergeMap(([action, acronymSelected]) => this.svomJsonKwService.loadKwSearchable(acronymSelected) + .pipe( + map(svomKeywords => svomJsonKwActions.loadKwSearchableSuccess({ svomKeywords })), + catchError(() => of(svomJsonKwActions.loadKwSearchableFail())) + ) + ) + ) + ); + + loadKwSearchableSuccess$ = createEffect(() => + this.actions$.pipe( + ofType(svomJsonKwActions.loadKwSearchableSuccess), + tap(() => { + this.toastr.success('SVOM Json Keywords was loaded successfully and are now available to product criteria', 'SVOM Json Keywords loaded') + }) + ), { dispatch: false} + ); + + addDatabaseFail$ = createEffect(() => + this.actions$.pipe( + ofType(svomJsonKwActions.loadKwSearchableFail), + tap(() => this.toastr.error('Failure to load Keywords', 'SVOM Json Keywords loaded failed')) + ), { dispatch: false} + ); + + constructor( + private actions$: Actions, + private store: Store<{ }>, + private svomJsonKwService: SvomJsonKwService, + private toastr: ToastrService + ) {} +} diff --git a/client/src/app/instance/store/models/index.ts b/client/src/app/instance/store/models/index.ts index 962eede1ad19a550541f007ee3155525a696c59c..2570f1630cacd2de9afd9bda713f92230d6b8f22 100644 --- a/client/src/app/instance/store/models/index.ts +++ b/client/src/app/instance/store/models/index.ts @@ -7,3 +7,4 @@ export * from './cone-search.model'; export * from './resolver.model'; export * from './search-multiple-dataset-length'; export * from './search-multiple-dataset-data'; +export * from './svom-keyword.model'; \ No newline at end of file diff --git a/client/src/app/instance/store/models/svom-keyword.model.ts b/client/src/app/instance/store/models/svom-keyword.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..1fabc699b4d1e4374f5b81f3120652615019ac65 --- /dev/null +++ b/client/src/app/instance/store/models/svom-keyword.model.ts @@ -0,0 +1,6 @@ +export interface SvomKeyword { + data_type: string + default: string + extension: string + name: string +} \ No newline at end of file diff --git a/client/src/app/instance/store/reducers/svom-json-kw.reducer.spec.ts b/client/src/app/instance/store/reducers/svom-json-kw.reducer.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..b5c3ae74ae385531869dbb3dda44ce1cd42d6094 --- /dev/null +++ b/client/src/app/instance/store/reducers/svom-json-kw.reducer.spec.ts @@ -0,0 +1,82 @@ +import * as fromSvomJsonKw from './svom-json-kw.reducer'; +import * as svomJsonKwActions from '../actions/svom-json-kw.actions'; + +describe('[Instance][Store] Svom Json Kw reducer', () => { + it('unknown action should return the default state', () => { + const { initialState } = fromSvomJsonKw; + const action = { type: 'Unknown' }; + const state = fromSvomJsonKw.svomJsonKwReducer(initialState, action); + + expect(state).toBe(initialState); + }); + + it('resetKw action should return the default state', () => { + const { initialState } = fromSvomJsonKw; + const action = svomJsonKwActions.resetKw(); + const state = fromSvomJsonKw.svomJsonKwReducer(initialState, action); + + expect(state).toEqual(initialState); + }); + + it('selectAcronym action should change the acronymSelected', () => { + const { initialState } = fromSvomJsonKw; + const action = svomJsonKwActions.selectAcronym({ acronymSelected: 'OBLC_ECL' }); + const state = fromSvomJsonKw.svomJsonKwReducer(initialState, action); + + expect(state.acronymSelected).toBe('OBLC_ECL'); + expect(state.svomKeywords).toEqual([]); + expect(state.svomKeywordsIsLoading).toBeFalsy(); + expect(state.svomKeywordsIsLoaded).toBeFalsy(); + expect(state).not.toBe(initialState); + }); + + it('loadKwSearchable action should change the svomKeywordsLoading and svomKeywordsLoaded', () => { + const { initialState } = fromSvomJsonKw; + const action = svomJsonKwActions.loadKwSearchable(); + const state = fromSvomJsonKw.svomJsonKwReducer(initialState, action); + + expect(state.acronymSelected).toBeNull(); + expect(state.svomKeywords).toEqual([]); + expect(state.svomKeywordsIsLoading).toBeTruthy(); + expect(state.svomKeywordsIsLoaded).toBeFalsy(); + expect(state).not.toBe(initialState); + }); + + it('loadKwSearchableSuccess action should change the svomKeywords, svomKeywordsLoading and svomKeywordsLoaded', () => { + const { initialState } = fromSvomJsonKw; + const svomKeywords = [ + { + data_type: 'string', + default: '', + extension: 'PrimaryHDU', + name: 'CARD' + }, + { + data_type: 'string', + default: '', + extension: 'PrimaryHDU', + name: 'TIME' + } + ]; + const action = svomJsonKwActions.loadKwSearchableSuccess({ svomKeywords }); + const state = fromSvomJsonKw.svomJsonKwReducer(initialState, action); + + expect(state.acronymSelected).toBeNull(); + expect(state.svomKeywords).toEqual(svomKeywords); + expect(state.svomKeywordsIsLoading).toBeFalsy(); + expect(state.svomKeywordsIsLoaded).toBeTruthy(); + expect(state).not.toBe(initialState); + }); + + it('loadKwSearchableFail action should change the svomKeywordsLoading and svomKeywordsLoaded', () => { + const { initialState } = fromSvomJsonKw; + const action = svomJsonKwActions.loadKwSearchableFail(); + const state = fromSvomJsonKw.svomJsonKwReducer(initialState, action); + + expect(state.acronymSelected).toBeNull(); + expect(state.svomKeywords).toEqual([]); + expect(state.svomKeywordsIsLoading).toBeFalsy(); + expect(state.svomKeywordsIsLoaded).toBeFalsy(); + expect(state).not.toBe(initialState); + }); +}); diff --git a/client/src/app/instance/store/reducers/svom-json-kw.reducer.ts b/client/src/app/instance/store/reducers/svom-json-kw.reducer.ts new file mode 100644 index 0000000000000000000000000000000000000000..37c8526080be9f97eaa006dab18595950c64cb4c --- /dev/null +++ b/client/src/app/instance/store/reducers/svom-json-kw.reducer.ts @@ -0,0 +1,64 @@ +/** + * This file is part of Anis Client. + * + * @copyright Laboratoire d'Astrophysique de Marseille / CNRS + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +import { createReducer, on } from '@ngrx/store'; + +import { SvomKeyword } from '../models'; +import * as svomJsonKwActions from '../actions/svom-json-kw.actions'; + +/** + * Interface for svom json kw state. + * + * @interface State + */ +export interface State { + acronymSelected: string; + svomKeywords: SvomKeyword[]; + svomKeywordsIsLoading: boolean; + svomKeywordsIsLoaded: boolean; +} + +export const initialState: State = { + acronymSelected: null, + svomKeywords: [], + svomKeywordsIsLoading: false, + svomKeywordsIsLoaded: false +}; + +export const svomJsonKwReducer = createReducer( + initialState, + on(svomJsonKwActions.resetKw, () => ({ + ...initialState + })), + on(svomJsonKwActions.selectAcronym, (state, { acronymSelected }) => ({ + ...state, + acronymSelected + })), + on(svomJsonKwActions.loadKwSearchable, (state) => ({ + ...state, + svomKeywordsIsLoading: true, + svomKeywordsIsLoaded: false + })), + on(svomJsonKwActions.loadKwSearchableSuccess, (state, { svomKeywords }) => ({ + ...state, + svomKeywords, + svomKeywordsIsLoading: false, + svomKeywordsIsLoaded: true + })), + on(svomJsonKwActions.loadKwSearchableFail, (state) => ({ + ...state, + svomKeywordsIsLoading: false, + svomKeywordsIsLoaded: false + })), +); + +export const selectAcronymSelected = (state: State) => state.acronymSelected; +export const selectSvomKeywords = (state: State) => state.svomKeywords; +export const selectSvomKeywordsIsLoading = (state: State) => state.svomKeywordsIsLoading; +export const selectSvomKeywordsIsLoaded = (state: State) => state.svomKeywordsIsLoaded; diff --git a/client/src/app/instance/store/selectors/svom-json-kw.selector.spec.ts b/client/src/app/instance/store/selectors/svom-json-kw.selector.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..e3e9604ca9f040164052454c0725d3990afa4822 --- /dev/null +++ b/client/src/app/instance/store/selectors/svom-json-kw.selector.spec.ts @@ -0,0 +1,24 @@ +import * as svomJsonKwSelector from './svom-json-kw.selector'; +import * as fromSvomJsonKw from '../reducers/svom-json-kw.reducer'; + +describe('[Instance][Store] Svom Json Kw selector', () => { + it('should get selectAcronymSelected', () => { + const state = { instance: { svomJsonKw: { ...fromSvomJsonKw.initialState }}}; + expect(svomJsonKwSelector.selectAcronymSelected(state)).toBeNull(); + }); + + it('should get selectSvomKeywords', () => { + const state = { instance: { svomJsonKw: { ...fromSvomJsonKw.initialState }}}; + expect(svomJsonKwSelector.selectSvomKeywords(state)).toEqual([]); + }); + + it('should get selectSvomKeywordsIsLoading', () => { + const state = { instance: { svomJsonKw: { ...fromSvomJsonKw.initialState }}}; + expect(svomJsonKwSelector.selectSvomKeywordsIsLoading(state)).toBeFalsy(); + }); + + it('should get selectSvomKeywordsIsLoaded', () => { + const state = { instance: { svomJsonKw: { ...fromSvomJsonKw.initialState }}}; + expect(svomJsonKwSelector.selectSvomKeywordsIsLoaded(state)).toBeFalsy(); + }); +}); diff --git a/client/src/app/instance/store/selectors/svom-json-kw.selector.ts b/client/src/app/instance/store/selectors/svom-json-kw.selector.ts new file mode 100644 index 0000000000000000000000000000000000000000..c178ec6252e68bd9ef6c5f62d1ab836572cfb970 --- /dev/null +++ b/client/src/app/instance/store/selectors/svom-json-kw.selector.ts @@ -0,0 +1,38 @@ +/** + * This file is part of Anis Client. + * + * @copyright Laboratoire d'Astrophysique de Marseille / CNRS + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +import { createSelector } from '@ngrx/store'; + +import * as reducer from '../../instance.reducer'; +import * as svomJsonKw from '../reducers/svom-json-kw.reducer'; + +export const selectSvomJsonKwState = createSelector( + reducer.getInstanceState, + (state: reducer.State) => state.svomJsonKw +); + +export const selectAcronymSelected = createSelector( + selectSvomJsonKwState, + svomJsonKw.selectAcronymSelected +); + +export const selectSvomKeywords = createSelector( + selectSvomJsonKwState, + svomJsonKw.selectSvomKeywords +); + +export const selectSvomKeywordsIsLoading = createSelector( + selectSvomJsonKwState, + svomJsonKw.selectSvomKeywordsIsLoading +); + +export const selectSvomKeywordsIsLoaded = createSelector( + selectSvomJsonKwState, + svomJsonKw.selectSvomKeywordsIsLoaded +); diff --git a/client/src/app/instance/store/services/index.ts b/client/src/app/instance/store/services/index.ts index cabc079690c1bfea8a44fddb9baa7123796937b2..795315e994b19b011ba88241a4428380e6932c09 100644 --- a/client/src/app/instance/store/services/index.ts +++ b/client/src/app/instance/store/services/index.ts @@ -2,10 +2,12 @@ import { SearchService } from './search.service'; import { SampService } from './samp.service'; import { ConeSearchService } from './cone-search.service'; import { DetailService } from './detail.service'; +import { SvomJsonKwService } from './svom-json-kw.service'; export const instanceServices = [ SearchService, SampService, ConeSearchService, - DetailService + DetailService, + SvomJsonKwService ]; diff --git a/client/src/app/instance/store/services/svom-json-kw.service.spec.ts b/client/src/app/instance/store/services/svom-json-kw.service.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..6a334fd2e614672688049927afef84a0273f165e --- /dev/null +++ b/client/src/app/instance/store/services/svom-json-kw.service.spec.ts @@ -0,0 +1,48 @@ +/** + * This file is part of Anis Client. + * + * @copyright Laboratoire d'Astrophysique de Marseille / CNRS + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +import { TestBed, inject } from '@angular/core/testing'; +import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; + +import { SvomJsonKwService } from './svom-json-kw.service'; +import { AppConfigService } from 'src/app/app-config.service'; + +describe('[Instance][Store] SvomJsonKwService', () => { + let service: SvomJsonKwService; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [HttpClientTestingModule], + providers: [ + { provide: AppConfigService, useValue: { apiUrl: 'http://testing.com' } }, + SvomJsonKwService + ] + }); + service = TestBed.inject(SvomJsonKwService); + }); + + it('#retrieveData() should return an Observable<any[]>', + inject([HttpTestingController, SvomJsonKwService],(httpMock: HttpTestingController, svomJsonKwService: SvomJsonKwService) => { + const mockResponse = ['myData']; + + svomJsonKwService.loadKwSearchable('OBLC_ECL').subscribe((event: any[]) => { + expect(event).toEqual(mockResponse); + }); + + const mockRequest = httpMock.expectOne('http://testing.com/search/sp_cards?a=8&c=1::eq::OBLC_ECL'); + + expect(mockRequest.cancelled).toBeFalsy(); + expect(mockRequest.request.responseType).toEqual('json'); + mockRequest.flush(mockResponse); + + httpMock.verify(); + } + ) + ); +}); \ No newline at end of file diff --git a/client/src/app/instance/store/services/svom-json-kw.service.ts b/client/src/app/instance/store/services/svom-json-kw.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..7a990aa7212a49ea99276349219e44b052d3f011 --- /dev/null +++ b/client/src/app/instance/store/services/svom-json-kw.service.ts @@ -0,0 +1,30 @@ +/** + * This file is part of Anis Client. + * + * @copyright Laboratoire d'Astrophysique de Marseille / CNRS + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { map } from 'rxjs/operators'; + +import { AppConfigService } from 'src/app/app-config.service'; +import { SvomKeyword } from '../models'; + +/** + * @class + * @classdesc Svom Json Kw service. + */ +@Injectable() +export class SvomJsonKwService { + constructor(private http: HttpClient, private config: AppConfigService) { } + + loadKwSearchable(acronym: string) { + return this.http.get<{search_kw: SvomKeyword[]}[]>(`${this.config.apiUrl}/search/sp_cards?a=8&c=1::eq::${acronym}`).pipe( + map(data => data[0].search_kw) + ); + } +} diff --git a/client/src/styles.scss b/client/src/styles.scss index db95f8b3e83d57b52cc97d8b8c0f4bb9a6f0a8b4..dc2941c08270668fa03342dfc3a55ea18eb2eb28 100644 --- a/client/src/styles.scss +++ b/client/src/styles.scss @@ -44,6 +44,14 @@ main { margin-top: 100px; } +.ng-select-container { + height: 38px !important; +} + +.ng-select.ng-select-disabled>.ng-select-container { + background-color: #e9ecef !important; +} + .custom-switch label, .custom-radio label { cursor: pointer; } diff --git a/conf-dev/create-db.sh b/conf-dev/create-db.sh index e328444a2e7b4e12657874b10532967869eb797c..9d007ea5ebfee2df17a8ea0629c777ac335c8a89 100644 --- a/conf-dev/create-db.sh +++ b/conf-dev/create-db.sh @@ -34,6 +34,7 @@ curl -d '{"label":"Date","value":"date","display":100,"select_name":"search_type curl -d '{"label":"Time","value":"time","display":110,"select_name":"search_type"}' --header 'Content-Type: application/json' -X POST http://localhost/option curl -d '{"label":"Date time","value":"date-time","display":120,"select_name":"search_type"}' --header 'Content-Type: application/json' -X POST http://localhost/option curl -d '{"label":"JSON","value":"json","display":130,"select_name":"search_type"}' --header 'Content-Type: application/json' -X POST http://localhost/option +curl -d '{"label":"SVOM JSON KW","value":"svom_json_kw","display":140,"select_name":"search_type"}' --header 'Content-Type: application/json' -X POST http://localhost/option curl -d '{"label":"=","value":"eq","display":10,"select_name":"operator"}' --header 'Content-Type: application/json' -X POST http://localhost/option curl -d '{"label":"≠","value":"neq","display":20,"select_name":"operator"}' --header 'Content-Type: application/json' -X POST http://localhost/option @@ -73,9 +74,10 @@ curl -d '{"label":"IRiS dataset family","display":30,"opened":true}' --header 'C # Add datasets curl -d '{"name":"vipers_dr2_w1","table_ref":"aspic_vipers_dr2_w1","label":"VIPERS-W1 (DR2)","description":"VIPERS W1 dataset","display":10,"data_path":"\/ASPIC\/VIPERS_DR2","config":{"images":[],"survey":{"survey_enabled":true,"survey_label":"More about this survey"},"cone_search":{"cone_search_enabled":false,"cone_search_opened":true,"cone_search_column_ra":null,"cone_search_column_dec":null,"cone_search_plot_enabled":false,"cone_search_sdss_enabled":true,"cone_search_sdss_display":10,"cone_search_background":[]},"download":{"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true},"summary":{"summary_enabled":true,"summary_opened":false},"server_link":{"server_link_enabled":false,"server_link_opened":false},"samp":{"samp_enabled":false,"samp_opened":false},"datatable":{"datatable_enabled":true,"datatable_opened":false,"datatable_selectable_rows":false}},"public":true,"survey_name":"anis_survey"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/1/dataset -curl -d '{"name":"sp_cards","table_ref":"sp_cards","label":"SP Metadata","description":"Contains metadata of scientific products (Core Program & General Program)","display":20,"data_path":"","config":{"images":[],"survey":{"survey_enabled":true,"survey_label":"More about this survey"},"cone_search":{"cone_search_enabled":false,"cone_search_opened":true,"cone_search_column_ra":null,"cone_search_column_dec":null,"cone_search_plot_enabled":false,"cone_search_sdss_enabled":true,"cone_search_sdss_display":10,"cone_search_background":[]},"download":{"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true},"summary":{"summary_enabled":true,"summary_opened":false},"server_link":{"server_link_enabled":false,"server_link_opened":false},"samp":{"samp_enabled":false,"samp_opened":false},"datatable":{"datatable_enabled":true,"datatable_opened":false,"datatable_selectable_rows":false}},"public":true,"survey_name":"svom"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/2/dataset +curl -d '{"name":"sp_cards","table_ref":"sp_cards","label":"SP Metadata","description":"Contains metadata of scientific products (Core Program & General Program)","display":30,"data_path":"","config":{"images":[],"survey":{"survey_enabled":true,"survey_label":"More about this survey"},"cone_search":{"cone_search_enabled":false,"cone_search_opened":true,"cone_search_column_ra":null,"cone_search_column_dec":null,"cone_search_plot_enabled":false,"cone_search_sdss_enabled":true,"cone_search_sdss_display":10,"cone_search_background":[]},"download":{"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true},"summary":{"summary_enabled":true,"summary_opened":false},"server_link":{"server_link_enabled":false,"server_link_opened":false},"samp":{"samp_enabled":false,"samp_opened":false},"datatable":{"datatable_enabled":true,"datatable_opened":false,"datatable_selectable_rows":false}},"public":true,"survey_name":"svom"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/2/dataset curl -d '{"name":"observations","table_ref":"v_observation","label":"IRiS obs","description":"IRiS observations","display":10,"data_path":"\/IRIS\/observations","config":{"images":[],"survey":{"survey_enabled":true,"survey_label":"More about this survey"},"cone_search":{"cone_search_enabled":false,"cone_search_opened":true,"cone_search_column_ra":null,"cone_search_column_dec":null,"cone_search_plot_enabled":false,"cone_search_sdss_enabled":true,"cone_search_sdss_display":10,"cone_search_background":[]},"download":{"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true},"summary":{"summary_enabled":true,"summary_opened":false},"server_link":{"server_link_enabled":false,"server_link_opened":false},"samp":{"samp_enabled":false,"samp_opened":false},"datatable":{"datatable_enabled":true,"datatable_opened":false,"datatable_selectable_rows":false}},"public":true,"survey_name":"iris"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/3/dataset curl -d '{"name":"vvds_f02_udeep","table_ref":"aspic_vvds_f02_udeep","label":"VVDS2h Ultra Deep","description":"VVDS2h Ultra Deep","display":20,"data_path":"","config":{"images":[],"survey":{"survey_enabled":true,"survey_label":"More about this survey"},"cone_search":{"cone_search_enabled":false,"cone_search_opened":true,"cone_search_column_ra":null,"cone_search_column_dec":null,"cone_search_plot_enabled":false,"cone_search_sdss_enabled":true,"cone_search_sdss_display":10,"cone_search_background":[]},"download":{"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true},"summary":{"summary_enabled":true,"summary_opened":false},"server_link":{"server_link_enabled":false,"server_link_opened":false},"samp":{"samp_enabled":false,"samp_opened":false},"datatable":{"datatable_enabled":true,"datatable_opened":false,"datatable_selectable_rows":false}},"public":true,"survey_name":"anis_survey"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/1/dataset +curl -d '{"name":"products","table_ref":"products","label":"Scientific Products","description":"SR3 & SR4 products list","display":20,"data_path":"","config":{"survey":{"survey_enabled":false,"survey_label":"More about this survey"},"cone_search":{"cone_search_enabled":false,"cone_search_opened":false,"cone_search_column_ra":false,"cone_search_column_dec":false,"cone_search_plot_enabled":false,"cone_search_sdss_enabled":false,"cone_search_sdss_display":false,"cone_search_background":[]},"download":{"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":false},"summary":{"summary_enabled":false,"summary_opened":false},"server_link":{"server_link_enabled":false,"server_link_opened":false},"samp":{"samp_enabled":false,"samp_opened":false},"datatable":{"datatable_enabled":true,"datatable_opened":true,"datatable_selectable_rows":false}},"public":true,"survey_name":"svom"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/2/dataset # Add vipers_dr2_w1 attributes curl -d '{"label":"Default","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vipers_dr2_w1/criteria-family @@ -103,7 +105,7 @@ curl -d '{"label":"Card","display":10,"opened":true}' --header 'Content-Type: ap curl -d '{"label":"Default","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/sp_cards/output-family curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/output-family/2/output-category -curl -d '{"id":1,"name":"acronym","label":"acronym","form_label":"Product Acronym","description":null,"output_display":10,"criteria_display":10,"search_flag":"ID","search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":[],"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":false,"renderer_detail":null,"renderer_detail_config":null,"options":[{"label":"LAMTEST","value":"LAMTEST","display":10},{"label":"LAMTEST_DC1","value":"LAMTEST_DC1","display":20},{"label":"MXT-EVT-CAL","value":"MXT-EVT-CAL","display":30}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/sp_cards/attribute +curl -d '{"id":1,"name":"acronym","label":"acronym","form_label":"Product Acronym","description":null,"output_display":10,"criteria_display":10,"search_flag":"ID","search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":[],"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":false,"renderer_detail":null,"renderer_detail_config":null,"options":[{"label":"LAMTEST","value":"LAMTEST","display":10},{"label":"LAMTEST_DC1","value":"LAMTEST_DC1","display":20},{"label":"MXT-EVT-CAL","value":"MXT-EVT-CAL","display":30},{"label":"OBLC_ECL","value":"OBLC_ECL","display":40}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/sp_cards/attribute curl -d '{"id":2,"name":"sp_id","label":"sp_id","form_label":"SP IAP ID","description":null,"output_display":20,"criteria_display":20,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":20,"selected":true,"order_by":false,"order_display":20,"detail":false,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/sp_cards/attribute curl -d '{"id":3,"name":"version","label":"version","form_label":"Version","description":null,"output_display":30,"criteria_display":30,"search_flag":null,"search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":30,"selected":true,"order_by":false,"order_display":30,"detail":false,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":2}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/sp_cards/attribute curl -d '{"id":4,"name":"program","label":"program","form_label":"Program","description":null,"output_display":40,"criteria_display":40,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":40,"selected":true,"order_by":false,"order_display":40,"detail":false,"renderer_detail":null,"renderer_detail_config":null,"options":[{"label":"CP","value":"CP","display":10},{"label":"GP","value":"GP","display":20}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/sp_cards/attribute @@ -141,3 +143,26 @@ curl -d '{"id":4,"name":"delta","label":"delta","form_label":"delta","descriptio curl -d '{"id":5,"name":"z_spec","label":"z_spec","form_label":"z_spec","description":null,"output_display":50,"criteria_display":50,"search_flag":null,"search_type":"between","type":"decimal","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":50,"selected":true,"order_by":false,"order_display":50,"detail":false,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":4,"id_output_category":5}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vvds_f02_udeep/attribute curl -d '{"id":6,"name":"zflag","label":"zflag","form_label":"zflag","description":null,"output_display":60,"criteria_display":60,"search_flag":null,"search_type":null,"type":"decimal","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":60,"selected":true,"order_by":false,"order_display":60,"detail":false,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":5}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vvds_f02_udeep/attribute curl -d '{"id":7,"name":"sel_mag","label":"sel_mag","form_label":"sel_mag","description":null,"output_display":70,"criteria_display":70,"search_flag":null,"search_type":"between","type":"decimal","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":70,"selected":true,"order_by":false,"order_display":70,"detail":false,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":4,"id_output_category":5}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vvds_f02_udeep/attribute + +# Add products attributes +curl -d '{"label":"Obs","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/criteria-family +curl -d '{"label":"Card","display":20,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/criteria-family +curl -d '{"label":"Default","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/output-family +curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/output-family/5/output-category +curl -d '{"label":"Additionnal","display":20}' --header 'Content-Type: application/json' -X POST http://localhost/output-family/5/output-category + +curl -d '{"id":1,"name":"product_id","label":"product_id","form_label":"Product ID","description":null,"output_display":10,"criteria_display":10,"search_flag":null,"search_type":"field","type":"integer","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":[],"selected":true,"order_by":true,"order_display":10,"detail":false,"display_detail":10,"renderer_detail":null,"renderer_detail_config":null,"options":[],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":5,"id_output_category":6}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":2,"name":"obs_id","label":"obs_id","form_label":"Observation ID","description":null,"output_display":20,"criteria_display":20,"search_flag":null,"search_type":"field","type":"bigint","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"selected":true,"order_by":false,"order_display":20,"detail":false,"display_detail":20,"renderer_detail":null,"renderer_detail_config":null,"options":[],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":5,"id_output_category":6}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":3,"name":"acronym","label":"acronym","form_label":"Product Acronym","description":null,"output_display":30,"criteria_display":30,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"selected":true,"order_by":false,"order_display":30,"detail":false,"display_detail":30,"renderer_detail":null,"renderer_detail_config":null,"options":[{"label":"ECL-DET-UBC","value":"ECL-DET-UBC","display":10},{"label":"OBLC_ECL","value":"OBLC_ECL","display":20}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":6,"id_output_category":6}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":4,"name":"url","label":"url","form_label":"Product URL","description":null,"output_display":40,"criteria_display":40,"search_flag":null,"search_type":null,"type":"text","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"link","renderer_config":{"href":"$value","display":"text","text":"$value","icon":"fas fa-link","blank":true},"selected":true,"order_by":false,"order_display":40,"detail":false,"display_detail":40,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":6}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":5,"name":"criteria","label":"criteria","form_label":"Product criteria (based on KWs searchables)","description":null,"output_display":50,"criteria_display":50,"search_flag":null,"search_type":"svom_json_kw","type":"json","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"json","renderer_config":[],"selected":false,"order_by":false,"order_display":50,"detail":false,"display_detail":50,"renderer_detail":null,"renderer_detail_config":null,"options":[],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":6,"id_output_category":7}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":6,"name":"added_at","label":"added_at","form_label":"Added at","description":null,"output_display":60,"criteria_display":60,"search_flag":null,"search_type":"between-date","type":"datetime","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"selected":true,"order_by":false,"order_display":60,"detail":false,"display_detail":60,"renderer_detail":null,"renderer_detail_config":null,"options":[],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":5,"id_output_category":6}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":7,"name":"product_version","label":"product_version","form_label":"Version","description":null,"output_display":70,"criteria_display":70,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"selected":true,"order_by":false,"order_display":70,"detail":false,"display_detail":70,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":6}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":8,"name":"program","label":"program","form_label":"Program","description":null,"output_display":80,"criteria_display":80,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"selected":false,"order_by":false,"order_display":80,"detail":false,"display_detail":80,"renderer_detail":null,"renderer_detail_config":null,"options":[{"label":"CoreProgram","value":"CoreProgram","display":10},{"label":"GeneralProgram","value":"GeneralProgram","display":20}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":6,"id_output_category":7}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":9,"name":"instrument","label":"instrument","form_label":"Instrument","description":null,"output_display":90,"criteria_display":90,"search_flag":null,"search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"selected":false,"order_by":false,"order_display":90,"detail":false,"display_detail":90,"renderer_detail":null,"renderer_detail_config":null,"options":[{"label":"ECL","value":"ECL","display":10}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":6,"id_output_category":7}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":10,"name":"type","label":"type","form_label":"Type","description":null,"output_display":100,"criteria_display":100,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"selected":false,"order_by":false,"order_display":100,"detail":false,"display_detail":100,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":11,"name":"upload_filename","label":"upload_filename","form_label":"Filename","description":null,"output_display":110,"criteria_display":110,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"selected":true,"order_by":false,"order_display":110,"detail":false,"display_detail":110,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":6}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":12,"name":"burst_id","label":"burst_id","form_label":"Burst ID","description":null,"output_display":120,"criteria_display":120,"search_flag":null,"search_type":"field","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"selected":true,"order_by":false,"order_display":120,"detail":false,"display_detail":120,"renderer_detail":null,"renderer_detail_config":null,"options":[],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":5,"id_output_category":6}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":13,"name":"pipeline_version","label":"pipeline_version","form_label":"Pipeline version","description":null,"output_display":130,"criteria_display":130,"search_flag":null,"search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"selected":false,"order_by":false,"order_display":130,"detail":false,"display_detail":130,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":14,"name":"schema_version","label":"schema_version","form_label":"Schema version","description":null,"output_display":140,"criteria_display":140,"search_flag":null,"search_type":null,"type":"float","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"selected":false,"order_by":false,"order_display":140,"detail":false,"display_detail":140,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute +curl -d '{"id":15,"name":"src_id","label":"src_id","form_label":"SRC ID","description":null,"output_display":150,"criteria_display":150,"search_flag":null,"search_type":null,"type":"integer","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"selected":false,"order_by":false,"order_display":150,"detail":false,"display_detail":150,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":7}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/products/attribute diff --git a/conf-dev/data_test.sql b/conf-dev/data_test.sql index 4f622573d027afe006006a0b39bae46c9a40e1d1..49034525c69b89aef9259a267dc5eae8d7ab97bf 100644 --- a/conf-dev/data_test.sql +++ b/conf-dev/data_test.sql @@ -232,11 +232,36 @@ CREATE TABLE public.sp_cards ( ); ALTER TABLE public.sp_cards OWNER TO anis; -COPY public.sp_cards (acronym, sp_id, version, program, instrument, type, json_schema, search_kw, json_schema_uploaded) FROM stdin; -MXT-EVT-CAL \N 0 GP MXT EVT {"mode": "GP", "name": "MXT-EVT-CAL", "instrument": "MXT", "product_keywords": [{"name": "OBS_ID", "format": "int", "default": 1, "location": {"type": "Keyword", "extension": "PrimaryHDU", "column_number": ""}, "sdb_index": {"search": true}, "description": "OBS_ID", "burst_advocate": {"select": true}, "expected_values": []}, {"name": "CARD", "format": "string", "default": "TT_ECL", "location": {"type": "Keyword", "extension": "PrimaryHDU", "column_number": ""}, "sdb_index": {"search": true}, "description": "CARD", "burst_advocate": {"select": true}, "expected_values": []}, {"name": "EXTEN0", "format": "string", "location": {"type": "Keyword", "extension": "PrimaryHDU", "column_number": ""}, "sdb_index": {"search": true}, "description": "file content", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "http://saada.unistra.fr/svom/schema/sdb_upload_observation.json", "format": "", "location": {"type": "Keyword", "extension": "PrimaryHDU", "column_number": ""}, "sdb_index": {"search": true}, "description": "Imported keywords", "burst_advocate": {"select": true}, "expected_values": []}, {"name": "EXTNAME", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Name", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HDUCLASS", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Format conforms to OGIP standards", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HDUCLAS1", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Event extension", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "CONTENT", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Product name", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "http://saada.unistra.fr/svom/schema/sdb_upload_observation.json", "format": "", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Imported keywords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEREF", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "reference time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TASSIGN", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Time assigned by clock", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEUNIT", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "unit for time keywords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIERABSO", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "[s] timing precision in seconds", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TSTART", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(MJD) time start", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TSTOP", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(MJD) time stop", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TELAPSE", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) elspsed time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "ONTIME", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) On-source time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "LIVETIME", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) Deadtime corrected on-source time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "EXPOSURE", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) Exposure time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DEADC", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Deadtime correction", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEPIXR", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Bin time beginning=0 middle=0.5 end=1", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEDEL", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) Data time resolution", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DATAMODE", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Datamode (only one supported !)", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "OBS_MODE", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DATE", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Extension creation ISO date", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "WHALFWD", "format": "int", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Window Half Width", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "WHALFHT", "format": "int", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Window Half Height", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "CCDEXPOS", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "CCD Exposure used for rates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "XSTDPHAS", "format": "boolean", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Is PHAS col in standard configuration (T/F)?", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "RA_NOM", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "R. A. of nominal aspect point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DEC_NOM", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Dec. of nominal aspect point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "ABERRAT", "format": "boolean", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Has aberration been corrected for in sky coords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "FOLOWSUN", "format": "boolean", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Has the Sun position been recalculated for each", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "XRTPI", "format": "boolean", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Is PI computed (T/F)? (hopefully YES !)", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DEADAPP", "format": "boolean", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Has DEADC been applied to data", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "MJD-OBS", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "MJD of data start time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "USER", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "User name of creator", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "FILIN001", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Input file name", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCTYP4", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS axis type", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRVL4", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS reference value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCDLT4", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS coordinate increment", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRPX4", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS Reference point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCTYP5", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS axis type", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRVL5", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS reference value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCDLT5", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS coordinate increment", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRPX5", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS Reference point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCTYP6", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETX axis type", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRVL6", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETX reference value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCDLT6", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETX coordinate increment", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRPX6", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETX Reference point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCUNI6", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETX unit", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCTYP7", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETY axis type", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRVL7", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETY reference value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCDLT7", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETY coordinate increment", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRPX7", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETY Reference point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCUNI7", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETY unit", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCTYP2", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "X axis type", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRVL2", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "X reference value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCDLT2", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "X coordinate increment", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRPX2", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "X Reference point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCUNI2", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "X unit", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TNULL2", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "X null value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCTYP3", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Y axis type", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRVL3", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Y reference value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCDLT3", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Y increment", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRPX3", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Y Reference point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCUNI3", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Y unit", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TNULL3", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Y null value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HISTORY", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "COMMENTS", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIME", "format": "1D", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "1"}, "sdb_index": {"search": false}, "description": "(s) Spacecraft clock time wrt 0 ref", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "X", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "2"}, "sdb_index": {"search": false}, "description": "(Pixel) Event X position Sky coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "Y", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "3"}, "sdb_index": {"search": false}, "description": "(Pixel) Event X position Sky coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "RAWX", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "4"}, "sdb_index": {"search": false}, "description": "(Pixel) Event X position RAW coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "RAWY", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "5"}, "sdb_index": {"search": false}, "description": "(Pixel) Event Y position RAW coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DETX", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "6"}, "sdb_index": {"search": false}, "description": "(Pixel) Event X position DET coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DETY", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "7"}, "sdb_index": {"search": false}, "description": "(Pixel) Event Y position DET coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "PHA", "format": "1J", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "8"}, "sdb_index": {"search": false}, "description": "(Chan) Pulse Height Analyzer after event recognition", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "PI", "format": "1B", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "9"}, "sdb_index": {"search": false}, "description": "(Chan) Pulse invariant", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "GRADE", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "10"}, "sdb_index": {"search": false}, "description": "Event Grade", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "http://saada.unistra.fr/svom/schema/sdb_upload_observation.json", "format": "", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "Imported keywords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "EXTNAME", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "name of this binary table extension", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEUNIT", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "Time unit for timing header keywords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEREF", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "reference time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TSTART", "format": "double", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) time start", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TSTOP", "format": "double", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) time stop", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "CREATOR", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "Program that created the fits file extension", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DATE", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "(ISO) Extension creation date", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HISTORY", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "COMMENTS", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "RAWX", "format": "1I", "location": {"type": "TableColumn", "extension": "BADPIX", "column_number": "1"}, "sdb_index": {"search": false}, "description": "(Pixel) X-position in raw detector coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "RAWY", "format": "1I", "location": {"type": "TableColumn", "extension": "BADPIX", "column_number": "2"}, "sdb_index": {"search": false}, "description": "(Pixel) Y-position in raw detector coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIME", "format": "1D", "location": {"type": "TableColumn", "extension": "BADPIX", "column_number": "3"}, "sdb_index": {"search": false}, "description": "(sec) Start Time of Bad Pixel Interval", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIME_STOP", "format": "1D", "location": {"type": "TableColumn", "extension": "BADPIX", "column_number": "4"}, "sdb_index": {"search": false}, "description": "(sec) End Time of Bad Pixel Interval", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "BADFLAG", "format": "16x", "location": {"type": "TableColumn", "extension": "BADPIX", "column_number": "5"}, "sdb_index": {"search": false}, "description": "Bad Pixel Flag (Array of BITs)", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "EXTNAME", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "name of this binary table extension", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HDUCLASS", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "File conforms to OGIP/GSFC conventions", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HDUCLAS1", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "File contains Good Time Intervals", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HDUCLAS2", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "File contains Good Time Intervals", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "GTI-DESC", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "GTI type description", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "http://saada.unistra.fr/svom/schema/sdb_upload_observation.json", "format": "", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "Imported keywords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DATAMODE", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "Datamode", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "ONTIME", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) On-source time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DEADC", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) Deadtime correction", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DEADAPP", "format": "boolean", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "Has DEADC been applied to data", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "EXPOSURE", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) Exposure time for these GTIs", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "LIVETIME", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) Deadtime corrected on-source time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TSTART", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) time start of the extension data", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TSTOP", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) time stop of the extension data", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TELAPSE", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) corresponding elapsed time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "MJD-OBS", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(MJD) MJD of data start time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEREF", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "reference time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEUNIT", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "unit for time keywords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIERABSO", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) timing precision in seconds", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "FILIN00i", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "Input file name", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "CREATOR", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "Task that created this extension", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DATE", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(ISO) extension creation date (UT)", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HISTORY", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(including in clear the command that created these GTIs so that the applied constraints are clear)", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "START", "format": "1D", "location": {"type": "TableColumn", "extension": "GTI", "column_number": "1"}, "sdb_index": {"search": false}, "description": "(sec) Start Times", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "STOP", "format": "1D", "location": {"type": "TableColumn", "extension": "GTI", "column_number": "2"}, "sdb_index": {"search": false}, "description": "(sec) Stop times", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "http://saada.unistra.fr/svom/schema/sdb_upload_obscore.json", "format": "", "location": {"type": "Keyword", "extension": "VO-TAGS", "column_number": ""}, "sdb_index": {"search": true}, "description": "Imported keywords", "burst_advocate": {"select": true}, "expected_values": []}, {"name": "PROVENANCE", "format": "1S", "location": {"type": "TableColumn", "extension": "VO-TAGS", "column_number": "1"}, "sdb_index": {"search": false}, "description": "Provenance instance", "burst_advocate": {"select": false}, "expected_values": []}]} {"date": "2019-07-18T16:07:39.940896", "keywords": [["PrimaryHDU", "EXTEN0"], ["PrimaryHDU", "TELESCOP"], ["PrimaryHDU", "INSTRUME"], ["PrimaryHDU", "FILTER"]], "table_columns": []} \N -LAMTEST \N 1 CP ALL \N {"mode": "GeneralProgram", "name": "LAMTEST", "instrument": "MXT", "uploaded_at": "2019-10-03 18:07:28.264130", "product_keywords": [{"name": "OBS_ID", "type": "KEYWORD", "default": 1, "data_type": "integer", "extension": "PrimaryHDU", "sdb_search": true, "description": "Observation identifier", "burst_advocate": true}, {"name": "TIME", "type": "TABLE_COLUMN", "data_type": "double", "extension": "EVENTS", "sdb_search": false, "data_format": "1D", "description": "(s) Spacecraft clock time wrt 0 ref", "column_number": 1, "burst_advocate": true}, {"name": "DP_TYPE", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "dataproduct_type", "burst_advocate": false, "expected_values": ["SPECTRUM", "IMAGE"]}, {"name": "CAL_LV", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "calib_level (0 to 4)", "burst_advocate": false, "expected_values": [0, 1, 2, 3, 4]}, {"name": "TARG_NM", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "target_name", "burst_advocate": false, "expected_values": []}, {"name": "TARG_CLA", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "target_class", "burst_advocate": false, "expected_values": []}, {"name": "OBS_ID", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "obs_id", "burst_advocate": false, "expected_values": []}, {"name": "OBS_TITL", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "obs_tittle", "burst_advocate": false, "expected_values": []}, {"name": "COLL_NM", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "obs_collection", "burst_advocate": false, "expected_values": []}, {"name": "CREA_DAT", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "obs_creation_date (ISO 8601)", "burst_advocate": false, "expected_values": []}, {"name": "RLEA_DAT", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "obs_release_date (ISO 8601)", "burst_advocate": false, "expected_values": []}, {"name": "PUB_DID", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "obs_publisher_did", "burst_advocate": false, "expected_values": []}, {"name": "BIB_REF", "type": "KEYWORD", "unit": "", "default": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "bib_reference", "burst_advocate": false, "expected_values": []}, {"name": "PUB_ID", "type": "KEYWORD", "unit": "", "default": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "data_rights", "burst_advocate": false, "expected_values": ["Public", "Secure", "Proprietary"]}, {"name": "URL", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "access_url", "burst_advocate": false, "expected_values": []}, {"name": "FORMAT", "type": "KEYWORD", "unit": "application/fits", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "access_format", "burst_advocate": false, "expected_values": []}, {"name": "EST_SIZE", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "access_estsize", "burst_advocate": false, "expected_values": []}, {"name": "S_RA", "type": "KEYWORD", "unit": "deg", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_ra ICRS (deg)", "burst_advocate": false, "expected_values": []}, {"name": "S_DEC", "type": "KEYWORD", "unit": "deg", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_dec ICRS (deg)", "burst_advocate": false, "expected_values": []}, {"name": "S_FOV", "type": "KEYWORD", "unit": "", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_fov (deg)", "burst_advocate": false, "expected_values": []}, {"name": "S_REGION", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_region ICRS", "burst_advocate": false, "expected_values": []}, {"name": "S_RES", "type": "KEYWORD", "unit": "arcsec", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_resolution (arcsec)", "burst_advocate": false, "expected_values": []}, {"name": "S_UCD", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_ucd", "burst_advocate": false, "expected_values": []}, {"name": "S_UNIT", "type": "KEYWORD", "unit": "deg", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_unit", "burst_advocate": false, "expected_values": []}, {"name": "S_CALST", "type": "KEYWORD", "unit": "calibrated", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_calib_status", "burst_advocate": false, "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "S_STERR", "type": "KEYWORD", "unit": "", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_stat_error", "burst_advocate": false, "expected_values": []}, {"name": "S_XEL1", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_xel1", "burst_advocate": false, "expected_values": []}, {"name": "S_XEL2", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_xel2", "burst_advocate": false, "expected_values": []}, {"name": "T_MIN", "type": "KEYWORD", "unit": "days", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "t_min (MJD)", "burst_advocate": false, "expected_values": []}, {"name": "T_MAX", "type": "KEYWORD", "unit": "days", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "t_max (MJD)", "burst_advocate": false, "expected_values": []}, {"name": "T_RES", "type": "KEYWORD", "unit": "s", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "t_resolution (s)", "burst_advocate": false, "expected_values": []}, {"name": "T_CALST", "type": "KEYWORD", "unit": "calibrated", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "t_calib_status", "burst_advocate": false, "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "T_STERR", "type": "KEYWORD", "unit": "s", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "t_stat_error", "burst_advocate": false, "expected_values": []}, {"name": "T_XEL", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "t_xel", "burst_advocate": false, "expected_values": []}, {"name": "EM_MIN", "type": "KEYWORD", "unit": "m", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_min (m)", "burst_advocate": false, "expected_values": []}, {"name": "EM_MAX", "type": "KEYWORD", "unit": "m", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_max (m)", "burst_advocate": false, "expected_values": []}, {"name": "EM_UCD", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_ucd", "burst_advocate": false, "expected_values": []}, {"name": "EM_UNIT", "type": "KEYWORD", "unit": "nm", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_unit", "burst_advocate": false, "expected_values": []}, {"name": "EM_CALST", "type": "KEYWORD", "unit": "calibrated", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_calib_status", "burst_advocate": false, "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "EM_RES", "type": "KEYWORD", "unit": "", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_resolution", "burst_advocate": false, "expected_values": []}, {"name": "EM_RPOW", "type": "KEYWORD", "unit": "", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_res_power", "burst_advocate": false, "expected_values": []}, {"name": "EM_RPMIN", "type": "KEYWORD", "unit": "", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_res_power_min", "burst_advocate": false, "expected_values": []}, {"name": "EM_RPMAX", "type": "KEYWORD", "unit": "", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_res_power_max", "burst_advocate": false, "expected_values": []}, {"name": "EM_XEL", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_xel", "burst_advocate": false, "expected_values": []}, {"name": "O_UCD", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "o_ucd", "burst_advocate": false, "expected_values": []}, {"name": "O_UNIT", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "o_unit", "burst_advocate": false, "expected_values": []}, {"name": "O_CALST", "type": "KEYWORD", "unit": "calibrated", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "o_calib_status", "burst_advocate": false, "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "POL_LIST", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "pol_states", "burst_advocate": false, "expected_values": []}, {"name": "POL_XEL", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "pol_xel", "burst_advocate": false, "expected_values": []}, {"name": "FACILITY", "type": "KEYWORD", "unit": "", "default": "SVOM", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "facility_name", "burst_advocate": false, "expected_values": []}, {"name": "INSTR_NM", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "instrument_name", "burst_advocate": false, "expected_values": []}, {"name": "PROP_ID", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "proposal_id", "burst_advocate": false, "expected_values": []}]} [{"name": "OBS_ID", "type": "KEYWORD", "default": 1, "data_type": "integer", "extension": "PrimaryHDU", "expected_values": null}, {"name": "DP_TYPE", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": ["SPECTRUM", "IMAGE"]}, {"name": "CAL_LV", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": [0, 1, 2, 3, 4]}, {"name": "TARG_NM", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "TARG_CLA", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "OBS_ID", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "OBS_TITL", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "COLL_NM", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "CREA_DAT", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "RLEA_DAT", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "PUB_DID", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "BIB_REF", "type": "KEYWORD", "default": "", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "PUB_ID", "type": "KEYWORD", "default": "", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": ["Public", "Secure", "Proprietary"]}, {"name": "URL", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "FORMAT", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EST_SIZE", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_RA", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_DEC", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_FOV", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_REGION", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_RES", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_UCD", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_UNIT", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_CALST", "type": "KEYWORD", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "S_STERR", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_XEL1", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_XEL2", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "T_MIN", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "T_MAX", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "T_RES", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "T_CALST", "type": "KEYWORD", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "T_STERR", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "T_XEL", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_MIN", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_MAX", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_UCD", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_UNIT", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_CALST", "type": "KEYWORD", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "EM_RES", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_RPOW", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_RPMIN", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_RPMAX", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_XEL", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "O_UCD", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "O_UNIT", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "O_CALST", "type": "KEYWORD", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "POL_LIST", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "POL_XEL", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "FACILITY", "type": "KEYWORD", "default": "SVOM", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "INSTR_NM", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "PROP_ID", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}] {"mode": "GeneralProgram", "name": "LAMTEST", "instrument": "MXT", "product_keywords": [{"name": "OBS_ID", "type": "KEYWORD", "default": 1, "data_type": "integer", "extension": "PrimaryHDU", "sdb_search": true, "description": "Observation identifier", "burst_advocate": true}, {"name": "TIME", "type": "TABLE_COLUMN", "data_type": "double", "extension": "EVENTS", "sdb_search": false, "data_format": "1D", "description": "(s) Spacecraft clock time wrt 0 ref", "column_number": 1, "burst_advocate": true}, {"url": "http://saada.unistra.fr/svom/products/sdb_upload_obscore.json", "type": "EXTERNAL", "extension": "OBSCORE_HDU", "sdb_search": true, "burst_advocate": false}]} -LAMTEST_DC1 \N 1 GP MXT \N {"mode": "GeneralProgram", "name": "LAMTEST_DC1", "instrument": "MXT", "uploaded_at": "2019-12-05 18:48:52.340454", "product_keywords": [{"name": "OBS_ID", "type": "KEYWORD", "default": 1, "data_type": "integer", "extension": "PrimaryHDU", "sdb_search": true, "description": "Observation identifier", "burst_advocate": false}, {"name": "TEST_KW", "type": "KEYWORD", "data_type": "integer", "extension": "PrimaryHDU", "sdb_search": true, "burst_advocate": false}]} [{"name": "OBS_ID", "type": "KEYWORD", "default": 1, "data_type": "integer", "extension": "PrimaryHDU", "expected_values": null}, {"name": "TEST_KW", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "PrimaryHDU", "expected_values": null}] {"mode": "GeneralProgram", "name": "LAMTEST_DC1", "instrument": "MXT", "product_keywords": [{"name": "OBS_ID", "type": "KEYWORD", "default": 1, "data_type": "integer", "extension": "PrimaryHDU", "sdb_search": true, "description": "Observation identifier", "burst_advocate": false}, {"name": "TEST_KW", "type": "KEYWORD", "data_type": "integer", "extension": "PrimaryHDU", "sdb_search": true, "burst_advocate": false}]} -\. +INSERT INTO "sp_cards" ("acronym", "sp_id", "version", "program", "instrument", "type", "json_schema", "search_kw", "json_schema_uploaded") VALUES +('MXT-EVT-CAL', NULL, 0, 'GP', 'MXT', 'EVT', '{"mode": "GP", "name": "MXT-EVT-CAL", "instrument": "MXT", "product_keywords": [{"name": "OBS_ID", "format": "int", "default": 1, "location": {"type": "Keyword", "extension": "PrimaryHDU", "column_number": ""}, "sdb_index": {"search": true}, "description": "OBS_ID", "burst_advocate": {"select": true}, "expected_values": []}, {"name": "CARD", "format": "string", "default": "TT_ECL", "location": {"type": "Keyword", "extension": "PrimaryHDU", "column_number": ""}, "sdb_index": {"search": true}, "description": "CARD", "burst_advocate": {"select": true}, "expected_values": []}, {"name": "EXTEN0", "format": "string", "location": {"type": "Keyword", "extension": "PrimaryHDU", "column_number": ""}, "sdb_index": {"search": true}, "description": "file content", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "http://saada.unistra.fr/svom/schema/sdb_upload_observation.json", "format": "", "location": {"type": "Keyword", "extension": "PrimaryHDU", "column_number": ""}, "sdb_index": {"search": true}, "description": "Imported keywords", "burst_advocate": {"select": true}, "expected_values": []}, {"name": "EXTNAME", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Name", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HDUCLASS", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Format conforms to OGIP standards", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HDUCLAS1", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Event extension", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "CONTENT", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Product name", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "http://saada.unistra.fr/svom/schema/sdb_upload_observation.json", "format": "", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Imported keywords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEREF", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "reference time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TASSIGN", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Time assigned by clock", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEUNIT", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "unit for time keywords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIERABSO", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "[s] timing precision in seconds", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TSTART", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(MJD) time start", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TSTOP", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(MJD) time stop", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TELAPSE", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) elspsed time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "ONTIME", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) On-source time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "LIVETIME", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) Deadtime corrected on-source time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "EXPOSURE", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) Exposure time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DEADC", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Deadtime correction", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEPIXR", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Bin time beginning=0 middle=0.5 end=1", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEDEL", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) Data time resolution", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DATAMODE", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Datamode (only one supported !)", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "OBS_MODE", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DATE", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Extension creation ISO date", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "WHALFWD", "format": "int", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Window Half Width", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "WHALFHT", "format": "int", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Window Half Height", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "CCDEXPOS", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "CCD Exposure used for rates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "XSTDPHAS", "format": "boolean", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Is PHAS col in standard configuration (T/F)?", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "RA_NOM", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "R. A. of nominal aspect point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DEC_NOM", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Dec. of nominal aspect point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "ABERRAT", "format": "boolean", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Has aberration been corrected for in sky coords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "FOLOWSUN", "format": "boolean", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Has the Sun position been recalculated for each", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "XRTPI", "format": "boolean", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Is PI computed (T/F)? (hopefully YES !)", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DEADAPP", "format": "boolean", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Has DEADC been applied to data", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "MJD-OBS", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "MJD of data start time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "USER", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "User name of creator", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "FILIN001", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Input file name", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCTYP4", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS axis type", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRVL4", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS reference value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCDLT4", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS coordinate increment", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRPX4", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS Reference point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCTYP5", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS axis type", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRVL5", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS reference value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCDLT5", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS coordinate increment", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRPX5", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "WCS Reference point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCTYP6", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETX axis type", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRVL6", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETX reference value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCDLT6", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETX coordinate increment", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRPX6", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETX Reference point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCUNI6", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETX unit", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCTYP7", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETY axis type", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRVL7", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETY reference value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCDLT7", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETY coordinate increment", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRPX7", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETY Reference point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCUNI7", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "DETY unit", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCTYP2", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "X axis type", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRVL2", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "X reference value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCDLT2", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "X coordinate increment", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRPX2", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "X Reference point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCUNI2", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "X unit", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TNULL2", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "X null value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCTYP3", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Y axis type", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRVL3", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Y reference value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCDLT3", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Y increment", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCRPX3", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Y Reference point", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TCUNI3", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Y unit", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TNULL3", "format": "double", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "Y null value", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HISTORY", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "COMMENTS", "format": "string", "location": {"type": "Keyword", "extension": "EVENTS", "column_number": ""}, "sdb_index": {"search": false}, "description": "", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIME", "format": "1D", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "1"}, "sdb_index": {"search": false}, "description": "(s) Spacecraft clock time wrt 0 ref", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "X", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "2"}, "sdb_index": {"search": false}, "description": "(Pixel) Event X position Sky coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "Y", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "3"}, "sdb_index": {"search": false}, "description": "(Pixel) Event X position Sky coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "RAWX", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "4"}, "sdb_index": {"search": false}, "description": "(Pixel) Event X position RAW coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "RAWY", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "5"}, "sdb_index": {"search": false}, "description": "(Pixel) Event Y position RAW coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DETX", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "6"}, "sdb_index": {"search": false}, "description": "(Pixel) Event X position DET coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DETY", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "7"}, "sdb_index": {"search": false}, "description": "(Pixel) Event Y position DET coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "PHA", "format": "1J", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "8"}, "sdb_index": {"search": false}, "description": "(Chan) Pulse Height Analyzer after event recognition", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "PI", "format": "1B", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "9"}, "sdb_index": {"search": false}, "description": "(Chan) Pulse invariant", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "GRADE", "format": "1I", "location": {"type": "TableColumn", "extension": "EVENTS", "column_number": "10"}, "sdb_index": {"search": false}, "description": "Event Grade", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "http://saada.unistra.fr/svom/schema/sdb_upload_observation.json", "format": "", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "Imported keywords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "EXTNAME", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "name of this binary table extension", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEUNIT", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "Time unit for timing header keywords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEREF", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "reference time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TSTART", "format": "double", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) time start", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TSTOP", "format": "double", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) time stop", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "CREATOR", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "Program that created the fits file extension", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DATE", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "(ISO) Extension creation date", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HISTORY", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "COMMENTS", "format": "string", "location": {"type": "Keyword", "extension": "BADPIX", "column_number": ""}, "sdb_index": {"search": false}, "description": "", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "RAWX", "format": "1I", "location": {"type": "TableColumn", "extension": "BADPIX", "column_number": "1"}, "sdb_index": {"search": false}, "description": "(Pixel) X-position in raw detector coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "RAWY", "format": "1I", "location": {"type": "TableColumn", "extension": "BADPIX", "column_number": "2"}, "sdb_index": {"search": false}, "description": "(Pixel) Y-position in raw detector coordinates", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIME", "format": "1D", "location": {"type": "TableColumn", "extension": "BADPIX", "column_number": "3"}, "sdb_index": {"search": false}, "description": "(sec) Start Time of Bad Pixel Interval", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIME_STOP", "format": "1D", "location": {"type": "TableColumn", "extension": "BADPIX", "column_number": "4"}, "sdb_index": {"search": false}, "description": "(sec) End Time of Bad Pixel Interval", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "BADFLAG", "format": "16x", "location": {"type": "TableColumn", "extension": "BADPIX", "column_number": "5"}, "sdb_index": {"search": false}, "description": "Bad Pixel Flag (Array of BITs)", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "EXTNAME", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "name of this binary table extension", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HDUCLASS", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "File conforms to OGIP/GSFC conventions", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HDUCLAS1", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "File contains Good Time Intervals", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HDUCLAS2", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "File contains Good Time Intervals", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "GTI-DESC", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "GTI type description", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "http://saada.unistra.fr/svom/schema/sdb_upload_observation.json", "format": "", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "Imported keywords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DATAMODE", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "Datamode", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "ONTIME", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) On-source time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DEADC", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) Deadtime correction", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DEADAPP", "format": "boolean", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "Has DEADC been applied to data", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "EXPOSURE", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) Exposure time for these GTIs", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "LIVETIME", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) Deadtime corrected on-source time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TSTART", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) time start of the extension data", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TSTOP", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) time stop of the extension data", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TELAPSE", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) corresponding elapsed time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "MJD-OBS", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(MJD) MJD of data start time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEREF", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "reference time", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIMEUNIT", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "unit for time keywords", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "TIERABSO", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(sec) timing precision in seconds", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "FILIN00i", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "Input file name", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "CREATOR", "format": "double", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "Task that created this extension", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "DATE", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(ISO) extension creation date (UT)", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "HISTORY", "format": "string", "location": {"type": "Keyword", "extension": "GTI", "column_number": ""}, "sdb_index": {"search": false}, "description": "(including in clear the command that created these GTIs so that the applied constraints are clear)", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "START", "format": "1D", "location": {"type": "TableColumn", "extension": "GTI", "column_number": "1"}, "sdb_index": {"search": false}, "description": "(sec) Start Times", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "STOP", "format": "1D", "location": {"type": "TableColumn", "extension": "GTI", "column_number": "2"}, "sdb_index": {"search": false}, "description": "(sec) Stop times", "burst_advocate": {"select": false}, "expected_values": []}, {"name": "http://saada.unistra.fr/svom/schema/sdb_upload_obscore.json", "format": "", "location": {"type": "Keyword", "extension": "VO-TAGS", "column_number": ""}, "sdb_index": {"search": true}, "description": "Imported keywords", "burst_advocate": {"select": true}, "expected_values": []}, {"name": "PROVENANCE", "format": "1S", "location": {"type": "TableColumn", "extension": "VO-TAGS", "column_number": "1"}, "sdb_index": {"search": false}, "description": "Provenance instance", "burst_advocate": {"select": false}, "expected_values": []}]}', '{"date": "2019-07-18T16:07:39.940896", "keywords": [["PrimaryHDU", "EXTEN0"], ["PrimaryHDU", "TELESCOP"], ["PrimaryHDU", "INSTRUME"], ["PrimaryHDU", "FILTER"]], "table_columns": []}', NULL), +('LAMTEST', NULL, 1, 'CP', 'ALL', NULL, '{"mode": "GeneralProgram", "name": "LAMTEST", "instrument": "MXT", "uploaded_at": "2019-10-03 18:07:28.264130", "product_keywords": [{"name": "OBS_ID", "type": "KEYWORD", "default": 1, "data_type": "integer", "extension": "PrimaryHDU", "sdb_search": true, "description": "Observation identifier", "burst_advocate": true}, {"name": "TIME", "type": "TABLE_COLUMN", "data_type": "double", "extension": "EVENTS", "sdb_search": false, "data_format": "1D", "description": "(s) Spacecraft clock time wrt 0 ref", "column_number": 1, "burst_advocate": true}, {"name": "DP_TYPE", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "dataproduct_type", "burst_advocate": false, "expected_values": ["SPECTRUM", "IMAGE"]}, {"name": "CAL_LV", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "calib_level (0 to 4)", "burst_advocate": false, "expected_values": [0, 1, 2, 3, 4]}, {"name": "TARG_NM", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "target_name", "burst_advocate": false, "expected_values": []}, {"name": "TARG_CLA", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "target_class", "burst_advocate": false, "expected_values": []}, {"name": "OBS_ID", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "obs_id", "burst_advocate": false, "expected_values": []}, {"name": "OBS_TITL", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "obs_tittle", "burst_advocate": false, "expected_values": []}, {"name": "COLL_NM", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "obs_collection", "burst_advocate": false, "expected_values": []}, {"name": "CREA_DAT", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "obs_creation_date (ISO 8601)", "burst_advocate": false, "expected_values": []}, {"name": "RLEA_DAT", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "obs_release_date (ISO 8601)", "burst_advocate": false, "expected_values": []}, {"name": "PUB_DID", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "obs_publisher_did", "burst_advocate": false, "expected_values": []}, {"name": "BIB_REF", "type": "KEYWORD", "unit": "", "default": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "bib_reference", "burst_advocate": false, "expected_values": []}, {"name": "PUB_ID", "type": "KEYWORD", "unit": "", "default": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "data_rights", "burst_advocate": false, "expected_values": ["Public", "Secure", "Proprietary"]}, {"name": "URL", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "access_url", "burst_advocate": false, "expected_values": []}, {"name": "FORMAT", "type": "KEYWORD", "unit": "application/fits", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "access_format", "burst_advocate": false, "expected_values": []}, {"name": "EST_SIZE", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "access_estsize", "burst_advocate": false, "expected_values": []}, {"name": "S_RA", "type": "KEYWORD", "unit": "deg", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_ra ICRS (deg)", "burst_advocate": false, "expected_values": []}, {"name": "S_DEC", "type": "KEYWORD", "unit": "deg", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_dec ICRS (deg)", "burst_advocate": false, "expected_values": []}, {"name": "S_FOV", "type": "KEYWORD", "unit": "", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_fov (deg)", "burst_advocate": false, "expected_values": []}, {"name": "S_REGION", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_region ICRS", "burst_advocate": false, "expected_values": []}, {"name": "S_RES", "type": "KEYWORD", "unit": "arcsec", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_resolution (arcsec)", "burst_advocate": false, "expected_values": []}, {"name": "S_UCD", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_ucd", "burst_advocate": false, "expected_values": []}, {"name": "S_UNIT", "type": "KEYWORD", "unit": "deg", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_unit", "burst_advocate": false, "expected_values": []}, {"name": "S_CALST", "type": "KEYWORD", "unit": "calibrated", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_calib_status", "burst_advocate": false, "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "S_STERR", "type": "KEYWORD", "unit": "", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_stat_error", "burst_advocate": false, "expected_values": []}, {"name": "S_XEL1", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_xel1", "burst_advocate": false, "expected_values": []}, {"name": "S_XEL2", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "s_xel2", "burst_advocate": false, "expected_values": []}, {"name": "T_MIN", "type": "KEYWORD", "unit": "days", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "t_min (MJD)", "burst_advocate": false, "expected_values": []}, {"name": "T_MAX", "type": "KEYWORD", "unit": "days", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "t_max (MJD)", "burst_advocate": false, "expected_values": []}, {"name": "T_RES", "type": "KEYWORD", "unit": "s", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "t_resolution (s)", "burst_advocate": false, "expected_values": []}, {"name": "T_CALST", "type": "KEYWORD", "unit": "calibrated", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "t_calib_status", "burst_advocate": false, "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "T_STERR", "type": "KEYWORD", "unit": "s", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "t_stat_error", "burst_advocate": false, "expected_values": []}, {"name": "T_XEL", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "t_xel", "burst_advocate": false, "expected_values": []}, {"name": "EM_MIN", "type": "KEYWORD", "unit": "m", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_min (m)", "burst_advocate": false, "expected_values": []}, {"name": "EM_MAX", "type": "KEYWORD", "unit": "m", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_max (m)", "burst_advocate": false, "expected_values": []}, {"name": "EM_UCD", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_ucd", "burst_advocate": false, "expected_values": []}, {"name": "EM_UNIT", "type": "KEYWORD", "unit": "nm", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_unit", "burst_advocate": false, "expected_values": []}, {"name": "EM_CALST", "type": "KEYWORD", "unit": "calibrated", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_calib_status", "burst_advocate": false, "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "EM_RES", "type": "KEYWORD", "unit": "", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_resolution", "burst_advocate": false, "expected_values": []}, {"name": "EM_RPOW", "type": "KEYWORD", "unit": "", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_res_power", "burst_advocate": false, "expected_values": []}, {"name": "EM_RPMIN", "type": "KEYWORD", "unit": "", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_res_power_min", "burst_advocate": false, "expected_values": []}, {"name": "EM_RPMAX", "type": "KEYWORD", "unit": "", "data_type": "double", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_res_power_max", "burst_advocate": false, "expected_values": []}, {"name": "EM_XEL", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "em_xel", "burst_advocate": false, "expected_values": []}, {"name": "O_UCD", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "o_ucd", "burst_advocate": false, "expected_values": []}, {"name": "O_UNIT", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "o_unit", "burst_advocate": false, "expected_values": []}, {"name": "O_CALST", "type": "KEYWORD", "unit": "calibrated", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "o_calib_status", "burst_advocate": false, "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "POL_LIST", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "pol_states", "burst_advocate": false, "expected_values": []}, {"name": "POL_XEL", "type": "KEYWORD", "unit": "", "data_type": "integer", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "pol_xel", "burst_advocate": false, "expected_values": []}, {"name": "FACILITY", "type": "KEYWORD", "unit": "", "default": "SVOM", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "facility_name", "burst_advocate": false, "expected_values": []}, {"name": "INSTR_NM", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "instrument_name", "burst_advocate": false, "expected_values": []}, {"name": "PROP_ID", "type": "KEYWORD", "unit": "", "data_type": "string", "extension": "OBSCORE_HDU", "sdb_search": true, "description": "proposal_id", "burst_advocate": false, "expected_values": []}]}', '[{"name": "OBS_ID", "type": "KEYWORD", "default": 1, "data_type": "integer", "extension": "PrimaryHDU", "expected_values": null}, {"name": "DP_TYPE", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": ["SPECTRUM", "IMAGE"]}, {"name": "CAL_LV", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": [0, 1, 2, 3, 4]}, {"name": "TARG_NM", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "TARG_CLA", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "OBS_ID", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "OBS_TITL", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "COLL_NM", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "CREA_DAT", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "RLEA_DAT", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "PUB_DID", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "BIB_REF", "type": "KEYWORD", "default": "", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "PUB_ID", "type": "KEYWORD", "default": "", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": ["Public", "Secure", "Proprietary"]}, {"name": "URL", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "FORMAT", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EST_SIZE", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_RA", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_DEC", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_FOV", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_REGION", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_RES", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_UCD", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_UNIT", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_CALST", "type": "KEYWORD", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "S_STERR", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_XEL1", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "S_XEL2", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "T_MIN", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "T_MAX", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "T_RES", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "T_CALST", "type": "KEYWORD", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "T_STERR", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "T_XEL", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_MIN", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_MAX", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_UCD", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_UNIT", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_CALST", "type": "KEYWORD", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "EM_RES", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_RPOW", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_RPMIN", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_RPMAX", "type": "KEYWORD", "default": null, "data_type": "double", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "EM_XEL", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "O_UCD", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "O_UNIT", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "O_CALST", "type": "KEYWORD", "default": "calibrated", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": ["uncalibrated", "raw", "calibrated", "relative"]}, {"name": "POL_LIST", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "POL_XEL", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "FACILITY", "type": "KEYWORD", "default": "SVOM", "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "INSTR_NM", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}, {"name": "PROP_ID", "type": "KEYWORD", "default": null, "data_type": "string", "extension": "OBSCORE_HDU", "expected_values": []}]', '{"mode": "GeneralProgram", "name": "LAMTEST", "instrument": "MXT", "product_keywords": [{"name": "OBS_ID", "type": "KEYWORD", "default": 1, "data_type": "integer", "extension": "PrimaryHDU", "sdb_search": true, "description": "Observation identifier", "burst_advocate": true}, {"name": "TIME", "type": "TABLE_COLUMN", "data_type": "double", "extension": "EVENTS", "sdb_search": false, "data_format": "1D", "description": "(s) Spacecraft clock time wrt 0 ref", "column_number": 1, "burst_advocate": true}, {"url": "http://saada.unistra.fr/svom/products/sdb_upload_obscore.json", "type": "EXTERNAL", "extension": "OBSCORE_HDU", "sdb_search": true, "burst_advocate": false}]}'), +('LAMTEST_DC1', NULL, 1, 'GP', 'MXT', NULL, '{"mode": "GeneralProgram", "name": "LAMTEST_DC1", "instrument": "MXT", "uploaded_at": "2019-12-05 18:48:52.340454", "product_keywords": [{"name": "OBS_ID", "type": "KEYWORD", "default": 1, "data_type": "integer", "extension": "PrimaryHDU", "sdb_search": true, "description": "Observation identifier", "burst_advocate": false}, {"name": "TEST_KW", "type": "KEYWORD", "data_type": "integer", "extension": "PrimaryHDU", "sdb_search": true, "burst_advocate": false}]}', '[{"name": "OBS_ID", "type": "KEYWORD", "default": 1, "data_type": "integer", "extension": "PrimaryHDU", "expected_values": null}, {"name": "TEST_KW", "type": "KEYWORD", "default": null, "data_type": "integer", "extension": "PrimaryHDU", "expected_values": null}]', '{"mode": "GeneralProgram", "name": "LAMTEST_DC1", "instrument": "MXT", "product_keywords": [{"name": "OBS_ID", "type": "KEYWORD", "default": 1, "data_type": "integer", "extension": "PrimaryHDU", "sdb_search": true, "description": "Observation identifier", "burst_advocate": false}, {"name": "TEST_KW", "type": "KEYWORD", "data_type": "integer", "extension": "PrimaryHDU", "sdb_search": true, "burst_advocate": false}]}'), +('OBLC_ECL', 7, 2.2, 'CP', 'ECL', 'OBLC', NULL, '[{"name": "ORIGIN", "default": "FSC", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "TELESCOP", "default": "SVOM", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "INSTRUME", "default": "ECL", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "CREATOR", "default": "VHFPREPROC", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "CARD", "default": "OBLC_ECL", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "PROGRAM", "default": "CoreProgram", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "PRDM_VER", "default": 2.2, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "GLDM_VER", "default": null, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "PROC_VER", "default": 1, "data_type": "integer", "extension": "PrimaryHDU"}, {"name": "SOFT_VER", "default": null, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "DATATYPE", "default": "VHF", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "DATE", "default": null, "data_type": "string", "extension": "PrimaryHDU"}, {"name": "TIMEREF", "default": "LOCAL", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "TIMESYS", "default": "TT", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "TIMEUNIT", "default": "s", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "MJDREFI", "default": 57754, "data_type": "integer", "extension": "PrimaryHDU"}, {"name": "MJDREFF", "default": 0.000800740741, "data_type": "double", "extension": "PrimaryHDU"}, {"name": "CLOCKCOR", "default": "YES", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "DP_LEVEL", "default": "Q1s", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "DATE-OBS", "default": null, "data_type": "string", "extension": "PrimaryHDU"}, {"name": "DATE-END", "default": null, "data_type": "string", "extension": "PrimaryHDU"}, {"name": "TSTART", "default": null, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "TSTOP", "default": null, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "RADESYS", "default": "ICRS", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "CONFIGUR", "default": null, "data_type": "string", "extension": "PrimaryHDU"}, {"name": "TASSIGN", "default": "SATELLITE", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "CHECKSUM", "default": null, "data_type": "string", "extension": "PrimaryHDU"}, {"name": "DATASUM", "default": null, "data_type": "string", "extension": "PrimaryHDU"}, {"name": "OBS_ID", "default": 4294967295, "data_type": "integer", "extension": "PrimaryHDU"}, {"name": "OBS_NUM", "default": 16777215, "data_type": "integer", "extension": "PrimaryHDU"}, {"name": "OBS_TYPE", "default": 255, "data_type": "integer", "extension": "PrimaryHDU"}, {"name": "OBS_SEQ", "default": 4095, "data_type": "integer", "extension": "PrimaryHDU"}, {"name": "BURST_ID", "default": "n.a.", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "OBJECTID", "default": "n.a.", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "SOURCEID", "default": "n.a.", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "_NBPROC", "default": null, "data_type": "integer", "extension": "PrimaryHDU"}, {"name": "_APID", "default": "TmVhfEclairs*LightCurve", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "TB0ABS", "default": 0, "data_type": "integer", "extension": "PrimaryHDU"}, {"name": "TB0ABMS", "default": 0, "data_type": "integer", "extension": "PrimaryHDU"}, {"name": "TB0ABMJD", "default": 0.0, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "TB0AUTC", "default": "0", "data_type": "string", "extension": "PrimaryHDU"}, {"name": "E0_MIN", "default": 4.0, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "E0_MAX", "default": 20.0, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "E1_MIN", "default": 20.0, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "E1_MAX", "default": 50.0, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "E2_MIN", "default": 50.0, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "E2_MAX", "default": 80.0, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "E3_MIN", "default": 80.0, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "E3_MAX", "default": 120.0, "data_type": "float", "extension": "PrimaryHDU"}, {"name": "CONTENT", "default": "ECLAIRs VHF LightCurve (reconstructed from VHF packets)", "data_type": "string", "extension": "PrimaryHDU"}]', NULL); + +-- SVOM PRODUCTS + +CREATE TABLE public.products ( + product_id integer NOT NULL, + obs_id bigint, + acronym character varying(20) NOT NULL, + url TEXT NOT NULL, + criteria jsonb, + added_at timestamp without time zone NOT NULL, + product_version integer NOT NULL, + program character varying(45) NOT NULL, + instrument character varying(20) NOT NULL, + type character varying(45) NOT NULL, + upload_filename character varying(100) NOT NULL, + burst_id character varying(45), + schema_version double precision NOT NULL, + pipeline_version double precision NOT NULL, + src_id integer +); +ALTER TABLE public.products OWNER TO anis; + +INSERT INTO "products" ("product_id", "obs_id", "acronym", "url", "criteria", "added_at", "product_version", "program", "instrument", "type", "upload_filename", "burst_id", "schema_version", "pipeline_version", "src_id") VALUES +(2, 1, 'OBLC_ECL', 'https://fsc.svom.org/sdb/data/products/CP/OBLC_ECL/2.fits', '{"1": {"CARD": "OBLC_ECL", "DATE": "2019-11-22T15:11:37 UTC", "NAXIS": 0, "BITPIX": 8, "E0_MAX": 20.0, "E0_MIN": 4.0, "E1_MAX": 50.0, "E1_MIN": 20.0, "E2_MAX": 80.0, "E2_MIN": 50.0, "E3_MAX": 120.0, "E3_MIN": 80.0, "EXTEND": true, "OBS_ID": 1, "SIMPLE": true, "TB0ABS": 71142892, "CONTENT": "ECLAIRs VHF LightCurve (reconstructed from VHF packets)", "MISSING": "Missing flag: 0 is not from missing packet, 1 estimated counts (1st missing packet), 2 estimated counts (following missing packet)", "POS_LAT": 0.0, "POS_LON": 0.0, "INSTRUME": "ECLAIRS", "TELESCOP": "SVOM"}, "HRSAMPLES": {"NAXIS": 2, "BITPIX": 8, "GCOUNT": 1, "NAXIS1": 30, "NAXIS2": 88, "PCOUNT": 0, "TFORM1": "E", "TFORM2": "I", "TFORM3": "E", "TFORM4": "E", "TFORM5": "E", "TFORM6": "E", "TFORM7": "E", "TFORM8": "E", "TTYPE1": "Time", "TTYPE2": "Missing", "TTYPE3": "CntEbd0", "TTYPE4": "CntEbd1", "TTYPE5": "CntEbd2", "TTYPE6": "CntEbd3", "TTYPE7": "CntEsat", "TTYPE8": "CntMult", "EXTNAME": "HRSAMPLES", "HRSAMPL": "ECLAIRs VHF LC HRsamples (Hi Resolution: 0.1 s samples)", "TFIELDS": 8, "XTENSION": "BINTABLE"}, "LRSAMPLES": {"NAXIS": 2, "BITPIX": 8, "GCOUNT": 1, "NAXIS1": 30, "NAXIS2": 80, "PCOUNT": 0, "TFORM1": "E", "TFORM2": "I", "TFORM3": "E", "TFORM4": "E", "TFORM5": "E", "TFORM6": "E", "TFORM7": "E", "TFORM8": "E", "TTYPE1": "Time", "TTYPE2": "Missing", "TTYPE3": "CntEbd0", "TTYPE4": "CntEbd1", "TTYPE5": "CntEbd2", "TTYPE6": "CntEbd3", "TTYPE7": "CntEsat", "TTYPE8": "CntMult", "EXTNAME": "LRSAMPLES", "LRSAMPL": "ECLAIRs VHF LC LRsamples (Low Resolution: 6.4 s samples)", "TFIELDS": 8, "XTENSION": "BINTABLE"}, "MRSAMPLES": {"NAXIS": 2, "BITPIX": 8, "GCOUNT": 1, "NAXIS1": 30, "NAXIS2": 88, "PCOUNT": 0, "TFORM1": "E", "TFORM2": "I", "TFORM3": "E", "TFORM4": "E", "TFORM5": "E", "TFORM6": "E", "TFORM7": "E", "TFORM8": "E", "TTYPE1": "Time", "TTYPE2": "Missing", "TTYPE3": "CntEbd0", "TTYPE4": "CntEbd1", "TTYPE5": "CntEbd2", "TTYPE6": "CntEbd3", "TTYPE7": "CntEsat", "TTYPE8": "CntMult", "EXTNAME": "MRSAMPLES", "MRSAMPL": "ECLAIRs VHF LC MRsamples (Mid Resolution: 0.8 s samples)", "TFIELDS": 8, "XTENSION": "BINTABLE"}}', '2019-11-22 15:12:04.621652', 0, 'CoreProgram', 'ECL', 'OBLC', '/home/svom/oblc/data/fits/OBLC_ECL-1300.fits', '0', 0, 0, 0), +(5, 1, 'ECL-DET-UBC', 'https://fsc.svom.org/sdb/data/products/GP/ECL-DET-UBC/5.fits', '{"1": {"CARD": "ECL-DET-UBC", "DATE": "2019-11-29T17:19:47", "APID_": "1", "DEADC": "", "NAXIS": 0, "STAMP": "", "TSTOP": 10.0, "BITPIX": 8, "EXTEND": true, "EXTREL": "", "MJDREF": 57754.0, "OBS_ID": "1", "ONTIME": 10.0, "ORIGIN": "FSC", "RA_PNT": 0.0, "SIMPLE": true, "SIMUID": "01", "TSTART": 0.0, "CREATOR": "ProcessBubeWithFiles", "DATASUM": "0", "DEC_PNT": 0.0, "FSCLEVL": "1", "HDUVERS": "1.1.0", "SIMFLAG": 1, "TELAPSE": "", "TIMEREF": "LOCAL", "TIMESYS": "TT", "CHECKSUM": "2bnR3ZnQ2bnQ2ZnQ", "CONFIGUR": "", "DATAMODE": "", "DATATYPE": "", "EXPOSURE": 10, "HDUCLASS": "OGIP", "INSTRUME": "ECL", "LONGSTRN": "OGIP 1.0", "OBSBOUND": "", "OBS_TYPE": "", "RADECSYS": "FK5", "TELESCOP": "SVOM", "TIMEUNIT": "s"}, "GROUPING": {"CARD": "", "DATE": "2019-11-29T17:19:47", "APID_": "1", "DEADC": "", "NAXIS": 2, "STAMP": "", "TSTOP": 10.0, "BITPIX": 8, "EXTREL": "", "EXTVER": "1", "GCOUNT": 1, "GRPID1": "-1", "GRPLC1": "", "MJDREF": 57754.0, "NAXIS1": 343, "NAXIS2": 5, "OBS_ID": "1", "ONTIME": "", "ORIGIN": "FSC", "PCOUNT": 0, "RA_PNT": 0.0, "SIMUID": "01", "TFORM1": "8A", "TFORM2": "32A", "TFORM3": "J", "TFORM4": "J", "TFORM5": "256A", "TFORM6": "3A", "TFORM7": "20A", "TFORM8": "E", "TFORM9": "E", "TSTART": 0.0, "TTYPE1": "member_xtension", "TTYPE2": "member_name", "TTYPE3": "member_version", "TTYPE4": "member_position", "TTYPE5": "member_location", "TTYPE6": "member_uri_type", "TTYPE7": "imatype", "TTYPE8": "chanmin", "TTYPE9": "chanmax", "CREATOR": "ProcessBubeWithFiles", "DATASUM": "2877723807", "DEC_PNT": 0.0, "EXTNAME": "GROUPING", "FSCLEVL": "1", "GRPNAME": "ECL-DET-UBC-GRP", "HDUVERS": "1.1.0", "SIMFLAG": 1, "TELAPSE": "", "TFIELDS": 11, "TFORM10": "E", "TFORM11": "E", "TIMEREF": "LOCAL", "TIMESYS": "TT", "TTYPE10": "e_min", "TTYPE11": "e_max", "TUNIT10": "keV", "TUNIT11": "keV", "CHECKSUM": "5CMl89Ki5CKi59Ki", "CONFIGUR": "", "DATAMODE": "", "DATATYPE": "", "DATE-END": "", "DATE-OBS": "", "EXPOSURE": 10, "HDUCLASS": "OGIP", "INSTRUME": "ECL", "LONGSTRN": "OGIP 1.0", "OBSBOUND": "", "OBS_TYPE": "", "RADECSYS": "FK5", "TELESCOP": "SVOM", "TIMEUNIT": "s", "XTENSION": "BINTABLE"}, "SHADOWGRAMCORR": {"DATE": "2019-11-29T17:19:47", "APID_": "1", "BUNIT": "cts.s^-1.cm^-2", "E_MAX": 764, "E_MIN": 465, "NAXIS": 2, "STAMP": "", "TSTOP": 10.0, "BITPIX": -32, "EXTREL": "", "GCOUNT": 1, "MJDREF": 57754.0, "NAXIS1": 80, "NAXIS2": 80, "OBS_ID": "1", "ORIGIN": "FSC", "PCOUNT": 0, "SIMUID": "01", "TSTART": 0.0, "CHANMAX": 764, "CHANMIN": 465, "CREATOR": "ProcessBubeWithFiles", "DATASUM": "526231649", "EXTNAME": "SHADOWGRAMCORR", "FSCLEVL": "1", "HDUVERS": "1.1.0", "IMATYPE": "Intensity", "SIMFLAG": 1, "TELAPSE": "", "TIMEREF": "LOCAL", "TIMESYS": "TT", "CHECKSUM": "UHUMa9UJWGUJa9UJ", "CONFIGUR": "", "DATAMODE": "", "DATATYPE": "", "EXPOSURE": 10, "HDUCLASS": "OGIP", "INSTRUME": "ECL", "LONGSTRN": "OGIP 1.0", "OBSBOUND": "", "OBS_TYPE": "", "TELESCOP": "SVOM", "TIMEUNIT": "s", "XTENSION": "IMAGE"}}', '2019-11-29 16:16:44.204881', 0, 'GeneralProgram', 'ECL', 'DET', 'ECL-DET-UBC-UTC18581117T000000.fits', '0', 0, 0, 0); -- VVDS F02 UDEEP CREATE TABLE public.aspic_vvds_f02_udeep (