Skip to content

Commit

Permalink
Merge pull request #1329 from Caltech-IPAC/IRSA-4902-update-for-newow…
Browse files Browse the repository at this point in the history
…ise-yr9-rel2022_3

updates for NEOWISE year9 data release
  • Loading branch information
wmiipac authored Mar 20, 2023
2 parents e0b0d9a + d4e1df2 commit c76572e
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 59 deletions.
17 changes: 10 additions & 7 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@


## Version 2022.3
- 2022.3.1 (Jan 2022)
- 2022.3.2 (March 2023)
- docker tag: `2022.3`, `2022.3.2`
- 2022.3.1 (Jan 2023)
- docker tag: `2022.3`, `2022.3.1`
- 2022.3.0 - (Dec 2023)
- 2022.3.0 - (Dec 2022)
- docker tag: `latest`, `2022.3`, `2022.3.0`

### _Notes_
Expand All @@ -33,16 +35,17 @@
- Plot.ly updated to 2.18.0 [Firefly-1079](https://github.com/Caltech-IPAC/firefly/pull/1272)
- Improved status page with version [Firefly-1116](https://github.com/Caltech-IPAC/firefly/pull/1295)


##### _Patches 2022.3_
- 2022.3.1
- fixed an undefined exception when SearchActions are empty
- 2022.3.2
- Updates for neowise year 9 release [PR](https://github.com/Caltech-IPAC/firefly/pull/1329)
- fixed: in certain cases multi-product view navigation not working when non-dataproduct tables are showing [Firefly-1182](https://github.com/Caltech-IPAC/firefly/pull/1329)

##### _Pull Requests in this release_
- [All Bug Fixes](https://github.com/caltech-ipac/firefly/pulls?q=is%3apr+milestone%3a2022.3+label%3abug)
- [All PRs](https://github.com/caltech-ipac/firefly/pulls?q=is%3apr++milestone%3a2022.3+)

##### _Patches 2022.3_
- 2022.3.1
- fixed an undefined exception when SearchActions are empty


## Version 2022.2
- 2022.2.6 (Dec 2022)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ private String processConstraints(Map<String, String> queryInfo) {
}

if (mergeImageSet.contains(DataProduct.NEOWISER_1B.dataset)) {
if (n>0) imageSetConstraint += ",6,7,8,9,10,11,12,13";
else imageSetConstraint += ",6,7,8,9,10,11,12,13";
if (n>0) imageSetConstraint += ",6,7,8,9,10,11,12,13,14";
else imageSetConstraint += ",6,7,8,9,10,11,12,13,14";
n++;
}

Expand Down
75 changes: 41 additions & 34 deletions src/firefly/java/edu/caltech/ipac/firefly/data/WiseRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ public class WiseRequest extends TableServerRequest {
public final static String NEOWISER_YR6 = "neowiser_yr6";
public final static String NEOWISER_YR7 = "neowiser_yr7";
public final static String NEOWISER_YR8 = "neowiser_yr8";
public final static String NEOWISER_YR9 = "neowiser_yr9"; //this is the on-going yr9 internal neowiser
public final static String NEOWISER_YR9 = "neowiser_yr9"; //yr9 neowiser going public
public final static String NEOWISER_YR10 = "neowiser_yr10";
public final static String PASS2_4BAND = "pass2-4band";
public final static String PASS2_3BAND = "pass2-3band";
public final static String PASS2_2BAND = "pass2-2band";
Expand All @@ -99,8 +100,9 @@ public class WiseRequest extends TableServerRequest {
put(NEOWISER_YR5,"neowiser_p1bs_psd");
put(NEOWISER_YR6,"neowiser_p1bs_psd");
put(NEOWISER_YR7,"neowiser_p1bs_psd");
put(NEOWISER_YR8,"neowiser_i1bs_psd"); //todo change to pibs when year 8 goes public
put(NEOWISER_YR9,"neowiser_i1bs_psd");
put(NEOWISER_YR8,"neowiser_p1bs_psd");
put(NEOWISER_YR9,"neowiser_p1bs_psd"); //yr9 neowiser going public
put(NEOWISER_YR10,"neowiser_i1bs_psd"); //yr10 internal ongoing ingestion

}
};
Expand All @@ -126,6 +128,7 @@ public class WiseRequest extends TableServerRequest {
put(NEOWISER_YR7,"NEOWISER YR7 (2 Bands)");
put(NEOWISER_YR8,"NEOWISER YR8 (2 Bands)");
put(NEOWISER_YR9,"NEOWISER YR9 (2 Bands)");
put(NEOWISER_YR10,"NEOWISER YR10 (2 Bands)");
put(PASS2_4BAND,"Pass 2 (4 Bands)");
put(PASS2_3BAND,"Pass 2 (3 Bands)");
put(PASS2_2BAND, "Pass 2 (2 Bands)");
Expand Down Expand Up @@ -157,37 +160,7 @@ public class WiseRequest extends TableServerRequest {
put(NEOWISER_YR7,"wise_neowiser_yr7");
put(NEOWISER_YR8,"wise_neowiser_yr8");
put(NEOWISER_YR9,"wise_neowiser_yr9");
}
};
// Scan ID ranges from Roc Cutri:
// prelim 00936a - 04125a
// pass 1 all 00712a - 12514a
// pass 2 4-bands 00712a - 07101a
// pass 2 3-bands 07101b - 08744a
// post-cryo 2-bands 08745a - 12514a
private static HashMap<String, Integer[]> SCANID_MAP = new HashMap<String, Integer[]>(){
{
put(PRELIM, new Integer[]{936, 4125});
put(PRELIM_POSTCRYO, new Integer[]{8745, 12514});
put(ALLSKY_4BAND, new Integer[]{712, 7101});
put(CRYO_3BAND, new Integer[]{7101, 8744});
put(POSTCRYO, new Integer[]{8745, 12514});
put(NEOWISER, new Integer[]{44212, 99799}); //public data to end of the yr5

put(PASS1, new Integer[]{712, 12514});
put(PASS2_4BAND, new Integer[]{712, 7101});
put(PASS2_3BAND, new Integer[]{7101, 8744});
put(PASS2_2BAND, new Integer[]{8745, 12514});
put(NEOWISER_PROV, new Integer[]{44212, 55289});
put(NEOWISER_YR1, new Integer[]{44212, 55289});
put(NEOWISER_YR2, new Integer[]{55290, 66418}); // 66418a is the last scan for yr2
put(NEOWISER_YR3, new Integer[]{66418, 77590}); // 66418b is the first scan for yr3 and 77509a is the last scan
put(NEOWISER_YR4, new Integer[]{77590, 88733}); // 77590b is the first scan for yr4 and 88733a is the last scan
put(NEOWISER_YR5, new Integer[]{88734, 99799}); // 88734a is the first scan for yr5
put(NEOWISER_YR6, new Integer[]{1090, 12253}); // 01090r is the first scan for yr6 , 12253r is the last scan
put(NEOWISER_YR7, new Integer[]{12254, 23446}); // 12254r is the first scan for yr7, 23446r is the last scan
put(NEOWISER_YR8, new Integer[]{23447, 34601}); // 23447r is the first scan for yr8, 34601r is the last scan
put(NEOWISER_YR9, new Integer[]{34601, 99999}); // 34601s is the first scan for yr9
put(NEOWISER_YR10,"wise_neowiser_yr10");
}
};
// mappings of the dataset selected to the wise table and table source values.
Expand Down Expand Up @@ -220,6 +193,7 @@ public class WiseRequest extends TableServerRequest {
put(NEOWISER_YR7 +"|1b", new String[]{"yr7_p1bm_frm", "yr7_p1bs_psd"}); // yr7 goes public March 2021
put(NEOWISER_YR8 +"|1b", new String[]{"yr8_i1bm_frm", "yr8_i1bs_psd"}); // yr8 internal for iwise
put(NEOWISER_YR9 +"|1b", new String[]{"yr9_i1bm_frm", "yr9_i1bs_psd"}); // yr9 internal for iwise
put(NEOWISER_YR10 +"|1b", new String[]{"yr10_i1bm_frm", "yr10_i1bs_psd"}); // yr10 internal for iwise
put(MERGE_INT+"|1b", new String[]{"merge_i1bm_frm", "merge_i1bs_psd"});
put(MERGE_INT+"|3a", new String[]{"merge_p3am_cdd", "merge_p3as_psd"});
put(PASS2_4BAND+"|1b", new String[]{"4band_i1bm_frm", "4band_i1bs_psd"});
Expand All @@ -230,6 +204,39 @@ public class WiseRequest extends TableServerRequest {
//put(PASS2_2BAND+"|3a", new String[]{"notknown", "notknown"});
}
};
// Scan ID ranges from Roc Cutri:
// prelim 00936a - 04125a
// pass 1 all 00712a - 12514a
// pass 2 4-bands 00712a - 07101a
// pass 2 3-bands 07101b - 08744a
// post-cryo 2-bands 08745a - 12514a
private static HashMap<String, Integer[]> SCANID_MAP = new HashMap<String, Integer[]>(){
{
put(PRELIM, new Integer[]{936, 4125});
put(PRELIM_POSTCRYO, new Integer[]{8745, 12514});
put(ALLSKY_4BAND, new Integer[]{712, 7101});
put(CRYO_3BAND, new Integer[]{7101, 8744});
put(POSTCRYO, new Integer[]{8745, 12514});
put(NEOWISER, new Integer[]{44212, 99799}); //public data to end of the yr5

put(PASS1, new Integer[]{712, 12514});
put(PASS2_4BAND, new Integer[]{712, 7101});
put(PASS2_3BAND, new Integer[]{7101, 8744});
put(PASS2_2BAND, new Integer[]{8745, 12514});
put(NEOWISER_PROV, new Integer[]{44212, 55289});
put(NEOWISER_YR1, new Integer[]{44212, 55289});
put(NEOWISER_YR2, new Integer[]{55290, 66418}); // 66418a is the last scan for yr2
put(NEOWISER_YR3, new Integer[]{66418, 77590}); // 66418b is the first scan for yr3 and 77509a is the last scan
put(NEOWISER_YR4, new Integer[]{77590, 88733}); // 77590b is the first scan for yr4 and 88733a is the last scan
put(NEOWISER_YR5, new Integer[]{88734, 99799}); // 88734a is the first scan for yr5
put(NEOWISER_YR6, new Integer[]{1090, 12253}); // 01090r is the first scan for yr6 , 12253r is the last scan
put(NEOWISER_YR7, new Integer[]{12254, 23446}); // 12254r is the first scan for yr7, 23446r is the last scan
put(NEOWISER_YR8, new Integer[]{23447, 34601}); // 23447r is the first scan for yr8, 34601r is the last scan
put(NEOWISER_YR9, new Integer[]{34601, 45803}); // 34601s is the first scan for yr9, 45803r is the last scan
put(NEOWISER_YR10, new Integer[]{45804, 99999}); // 45804r is the first scan for yr10

}
};

//======================================================================
//----------------------- Constructors ---------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,9 @@ private String processConstraints(WiseRequest req) throws EndUserException {
n++;
}

if (imageSets.contains(WiseRequest.NEOWISER)) { // public merge upto yr8
if (n > 0) imageSetConstraint += ",6,7,8,9,10,11,12,13";
else imageSetConstraint += "6,7,8,9,10,11,12,13";
if (imageSets.contains(WiseRequest.NEOWISER)) { // public merge upto yr9
if (n > 0) imageSetConstraint += ",6,7,8,9,10,11,12,13,14";
else imageSetConstraint += "6,7,8,9,10,11,12,13,14";
n++;
}

Expand Down
2 changes: 1 addition & 1 deletion src/firefly/js/ui/PagingBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function PagingBar(props) {
const nchar = totalPages.toString().length;

const pagestr = (totalRows === 0) ? '' :
`(${(startIdx+1).toLocaleString()} - ${endIdx.toLocaleString()} of ${totalRows.toLocaleString()})`;
`(${(startIdx+1).toLocaleString()} - ${endIdx.toLocaleString()} of ${totalRows?.toLocaleString()??''})`;
const showingLabel = ( <div style={{fontSize: 'smaller', marginLeft: 3, display: 'inline-flex', alignItems: 'center', width: `${3 * nchar + 7}ch`}} >
{pagestr}
</div>
Expand Down
10 changes: 7 additions & 3 deletions src/firefly/js/visualize/saga/DataProductsWatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,24 @@ function watchDataProductsTable(tbl_id, action, cancelSelf, params) {

if (payload.viewerId && payload.viewerId!==imageViewerId) return {...params,firstTime};

const payloadTblId= payload.tbl_id ?? payload.associatedTblId;


if (payload.tbl_id) {
if (payload.tbl_id!==tbl_id) return {...params,firstTime};
if (payloadTblId) {
if (payloadTblId!==tbl_id) return {...params,firstTime};
if (action.type===TABLE_REMOVE) {
removeAllProducts(activateParams,tbl_id);
// todo might need to remove other stuff as well: charts, images, jpeg
cancelSelf();
return;
}
if (paused && imView && dpView) paused= false;
if (paused && imView?.mounted) paused= false;
}
else {
if (getActiveTableId()!==tbl_id) return {...params, firstTime};
if (getActiveTableId()!==tbl_id) {
return {...params, firstTime};
}
}


Expand Down
4 changes: 2 additions & 2 deletions src/firefly/js/visualize/ui/ImageMetaDataToolbarView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ export function ImageMetaDataToolbarView({viewerId, viewerPlotIds=[], layoutType
horizontal={true}
onClick={() => dispatchChangeViewerLayout(viewerId,SINGLE, undefined, activeTable?.tbl_id)}/>}

{converter.canGrid && <ToolbarButton icon={FULL_GRID} tip={'Show full grid'}
{converter.canGrid && <ToolbarButton icon={FULL_GRID} tip={'Tile all images in the search result table'}
enabled={true} visible={true} horizontal={true}
imageStyle={{width:24,height:24, flex: '0 0 auto'}}
onClick={() => dispatchChangeViewerLayout(viewerId,GRID,GRID_FULL,activeTable?.tbl_id)}/>}

{converter.hasRelatedBands &&
<ToolbarButton icon={GRID_GROUP} tip={'View all images from this image set, tiled'}
<ToolbarButton icon={GRID_GROUP} tip={'Tile all data products associated with the highlighted table row'}
enabled={true} visible={true} horizontal={true}
imageStyle={{width:24,height:24, flex: '0 0 auto'}}
style={{marginLeft: 20}}
Expand Down
35 changes: 28 additions & 7 deletions src/firefly/js/visualize/ui/MultProductViewerContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* License information at https://github.com/Caltech-IPAC/firefly/blob/master/License.txt
*/

import React, {useEffect} from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import {getActiveTableId} from '../../tables/TableUtil.js';
import {getActiveTableId, getTblById} from '../../tables/TableUtil.js';
import {useStoreConnector} from '../../ui/SimpleComponent.jsx';
import {isDataProductsTable} from '../../util/VOAnalyzer.js';
import {ImageExpandedMode} from '../iv/ImageExpandedMode.jsx';
Expand All @@ -13,6 +13,31 @@ import {MetaDataMultiProductViewer} from './MetaDataMultiProductViewer';

const closeExpanded= () => dispatchSetLayoutMode(LO_MODE.expanded, LO_VIEW.none);

let lastMetaDataTbls=[];

function getMetaDataTbl() {
const tbl_id= getActiveTableId('main');
const tblAry= lastMetaDataTbls;
if (!tbl_id && tblAry.length===0) return;
if (isDataProductsTable(tbl_id)) {
if (tblAry[0]!==tbl_id) { //make sure it is the first entry
lastMetaDataTbls= tblAry.filter( (id) => id!==tbl_id);
lastMetaDataTbls.unshift(tbl_id);
}
return tbl_id;
}
else {
const newTblId= tblAry.find( (id) => {
return Boolean(getTblById(id));
});
if (newTblId!==tblAry[0]) { // filter out any dead tables
lastMetaDataTbls= tblAry.filter( (id) => Boolean(getTblById(id)));
}
return newTblId;
}
}


/**
* A wrapper component for MultiImageViewer where expended mode is supported.
*/
Expand All @@ -22,11 +47,7 @@ export function MultiProductViewerContainer({ tbl_id= undefined, imageExpandedMo
noProductMessage= 'No Data Products Available'}) {


const dataProductsTblId= useStoreConnector((lastTblId=undefined) => {
const tbl_id= getActiveTableId('main');
if (tbl_id===lastTblId) return tbl_id;
return isDataProductsTable(tbl_id) ? tbl_id : lastTblId;
});
const dataProductsTblId= useStoreConnector(() => getMetaDataTbl() );
const dpTbl= tbl_id ?? dataProductsTblId;

if (imageExpandedMode) {
Expand Down

0 comments on commit c76572e

Please sign in to comment.